- classlibsamples.zip
- ADO
- Browser
- Colorpicker
- CRC
- DynamicDialog
- FastFind
- FileDirTree
- Hash
- InfoBar
- LayoutEngine
- MDI
- MRU
- MultiMon
- PanelBar
- Samples.sln
- XPControls
- XPMenu
- samplesexe.zip
- ADO.exe
- Browser.exe
- Colorpicker.exe
- CRC.exe
- DynamicDialog.exe
- FastFind.exe
- FileDirTree.exe
- Hash.exe
- InfoBar.exe
- LayoutEngine.exe
- MDI.exe
- MRU.exe
- MultiMon.exe
- PanelBar.exe
- XPControls.exe
- XPMenu.exe
- classlib.zip
- samples.zip
- Browser.exe
- Colorpicker.exe
- CRC.exe
- DynamicDialog.exe
- FastFind.exe
- FileDirTree.exe
- Hash.exe
- InfoBar.exe
- LayoutEngine.exe
- MDI.exe
- MRU.exe
- MultiMon.exe
- XPMenu.exe
- classes.zip
- Classes
- ALL.H
- application.cpp
- application.h
- ClassHierarchy.txt
- ClassLib.dsp
- ClassLib.dsw
- ClassLib.sln
- ClassLib.suo
- ClassLib.vcproj
- Collectors
- Coords
- Exceptions
- GDI
- History.txt
- IO
- Layout
- LIB6
- LIB7
- Menus
- Samples
- Colorpicker
- CRC
- DynamicDialog
- FastFind
- FileDirTree
- Hash
- InfoBar
- LayoutEngine
- MDI
- MRU
- MultiMon
- XPMenu
- Shell
- STANDARD.H
- Strings
- Threads
- TODO.TXT
- Tools
- Windows
|
#ifndef _DIALOG_H_
#define _DIALOG_H_
//
// dialog.h
//
// (C) Copyright 2000 Jan van den Baard.
// All Rights Reserved.
//
#include "window.h"
// Structure used to pass font data with
// dynamic dialog creation.
typedef struct tagFontData
{
short sPointSize;
short sWeight;
BOOL bItalic;
TCHAR szFacename[ LF_FACESIZE ];
} FONTDATA, FAR *LPFONTDATA;
// Structure used to dynamically create a dialog.
// I.E. Dialog creation without using a resource
// based template.
typedef struct tagCreateDialog
{
LPCTSTR pszTitle;
DWORD dwStyle;
DWORD dwExStyle;
DWORD dwHelpID;
int nLeft;
int nTop;
int nWidth;
int nHeight;
LPFONTDATA pFontData;
} CREATEDIALOG, FAR *LPCREATEDIALOG;
// This class is a ClsWindow derived class that
// handles dialog boxes.
class ClsDialog : public ClsWindow
{
_NO_COPY( ClsDialog );
public:
// Constructor.
ClsDialog();
// Destructor.
virtual ~ClsDialog();
// Interface
int DoModal( ClsWindow& cwParent, LPCTSTR pszDialogName );
int DoModal( LPCTSTR pszDialogName );
int DoModal( int nDialogID );
int DoModal( ClsWindow& cwParent, int nDialogID );
int DoModal( LPCREATEDIALOG pCreateDialog );
int DoModal( ClsWindow& cwParent, LPCREATEDIALOG pCreateDialog );
BOOL Create( ClsWindow& cwParent, LPCTSTR pszDialogName );
BOOL Create( LPCTSTR pszDialogName );
BOOL Create( ClsWindow& cwParent, LPCREATEDIALOG pCreateDialog );
BOOL Create( LPCREATEDIALOG pCreateDialog );
BOOL EndDialog( int nResult );
// Overidables.
virtual BOOL OnOK();
virtual BOOL OnCancel();
virtual LRESULT OnInitDialog( PROPSHEETPAGE *pPropSheetPage );
virtual void OnFontDistributed();
protected:
// Base class override. Calls OnInitDialog() when the WM_INITDIALOG
// message is received.
virtual LRESULT WindowProc( UINT uMsg, WPARAM wParam, LPARAM lParam );
// EnumChildWindows() procedure to set the dialog font
// to all controls.
static BOOL CALLBACK DistributeDialogFont( HWND hWndChild, LPARAM lParam );
// WM_COMMAND message handler which will call OnOK() when the
// ID is IDOK and OnCancel() when the ID is IDCANCEL.
virtual LRESULT OnCommand( UINT nNotifyCode, UINT nCtrlID, HWND hWndCtrl );
// Helper to construct a memory based dialog template.
static HGLOBAL CreateDialogTemplate( LPCREATEDIALOG pCreateDialog );
// Our own modal dialog box message pump. We do not use the
// system modal dialog box procedures because we need to call
// the ClsWindow->PreTranslateMessage() function for the
// controls in our global window list.
int ModalDialog( ClsWindow *pParent, LPCTSTR pszDialogName, LPCREATEDIALOG pCreateDialog = NULL );
// Data.
BOOL m_bIsModal;
BOOL m_bKeepModal;
BOOL m_bContinueModal;
int m_nResult;
};
#endif // _DIALOG_H_
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been programming for a hobby since 1985. I have started programming on the C= 64. After that I migrated to the C= Amiga which I traded in for a PC back in 1997 I believe. Back in 2000 I decided to lose a hobby and start developing software for a living.
Currently I am working mainly in developing software for building security and access control systems.