uLib  User mode C/C++ extended API library for Win32 programmers.
Standard Dialog Support

Module Description

System standard dialog wrapper classes.
#include <uLib/StdDlg.h>

These classes add supplementary functionality to the standard dialogs
enhancing their functionality and/or easing their use.

Classes

class  FileDialog
 
class  FindDialog
 
class  FontDialog
 
class  ColorDialog
 
class  DirDialog
 

Macros

#define DLGHOOKPROC   UINT_PTR CALLBACK
 
#define REGISTER_CommonHelp()   if (!WM_CommonHelp) WM_CommonHelp = RegisterWindowMessage( HELPMSGSTRING )
 
#define REGISTER_FileOk()   if (!WM_FileOk) WM_FileOk = RegisterWindowMessage( FILEOKSTRING )
 
#define REGISTER_SelChange()   if (!WM_SelChange) WM_SelChange = RegisterWindowMessage( LBSELCHSTRING )
 
#define REGISTER_ShareViolation()   if (!WM_ShareViolation) WM_ShareViolation = RegisterWindowMessage( SHAREVISTRING )
 
#define REGISTER_FindReplace()   if (!WM_FindReplace) WM_FindReplace = RegisterWindowMessage( FINDMSGSTRING )
 
#define REGISTER_ColorOk()   if (!WM_ColorOk) WM_ColorOk = RegisterWindowMessage( COLOROKSTRING )
 
#define REGISTER_SetRGB()   if (!WM_SetRGB) WM_SetRGB = RegisterWindowMessage( SETRGBSTRING )
 
#define FRX_FINDALL   0x00100000
 
#define FR_ACTIONMASK   (FR_FINDNEXT| FR_REPLACE |FR_REPLACEALL| FR_DIALOGTERM| FRX_FINDALL)
 
#define FR_OPTIONMASK   (FR_DOWN| FR_MATCHCASE| FR_WHOLEWORD)
 
#define BIF_DEFAULT   (BIF_RETURNONLYFSDIRS| BIF_NEWDIALOGSTYLE| BIF_EDITBOX)
 

Typedefs

typedef class FileDialogPFileDialog
 
typedef class DirDialogPDirDialog
 
typedef class FindDialogPFindDialog
 
typedef class FontDialogPFontDialog
 
typedef class ColorDialogPColorDialog
 
typedef bool(CALLBACK * FDLG_ItemProc) (CSTR FileName, PVOID UserData)
 

Functions

ACSTR CDErrorMsg (DWORD Err=0)
 

Variables

UINT WM_CommonHelp
 
UINT WM_FileOk
 
UINT WM_SelChange
 
UINT WM_ShareViolation
 
UINT WM_FindReplace
 
UINT WM_ColorOk
 
UINT WM_SetRGB
 
const CSTR ALLFILE_FILTER
 

Macro Definition Documentation

◆ DLGHOOKPROC

#define DLGHOOKPROC   UINT_PTR CALLBACK

Definition at line 21 of file StdDlg.h.

◆ REGISTER_CommonHelp

#define REGISTER_CommonHelp ( )    if (!WM_CommonHelp) WM_CommonHelp = RegisterWindowMessage( HELPMSGSTRING )

Definition at line 43 of file StdDlg.h.

◆ REGISTER_FileOk

#define REGISTER_FileOk ( )    if (!WM_FileOk) WM_FileOk = RegisterWindowMessage( FILEOKSTRING )

Definition at line 46 of file StdDlg.h.

◆ REGISTER_SelChange

#define REGISTER_SelChange ( )    if (!WM_SelChange) WM_SelChange = RegisterWindowMessage( LBSELCHSTRING )

Definition at line 49 of file StdDlg.h.

◆ REGISTER_ShareViolation

#define REGISTER_ShareViolation ( )    if (!WM_ShareViolation) WM_ShareViolation = RegisterWindowMessage( SHAREVISTRING )

Definition at line 52 of file StdDlg.h.

◆ REGISTER_FindReplace

#define REGISTER_FindReplace ( )    if (!WM_FindReplace) WM_FindReplace = RegisterWindowMessage( FINDMSGSTRING )

Definition at line 55 of file StdDlg.h.

◆ REGISTER_ColorOk

#define REGISTER_ColorOk ( )    if (!WM_ColorOk) WM_ColorOk = RegisterWindowMessage( COLOROKSTRING )

Definition at line 58 of file StdDlg.h.

◆ REGISTER_SetRGB

#define REGISTER_SetRGB ( )    if (!WM_SetRGB) WM_SetRGB = RegisterWindowMessage( SETRGBSTRING )

Definition at line 61 of file StdDlg.h.

◆ FRX_FINDALL

#define FRX_FINDALL   0x00100000

Definition at line 159 of file StdDlg.h.

◆ FR_ACTIONMASK

#define FR_ACTIONMASK   (FR_FINDNEXT| FR_REPLACE |FR_REPLACEALL| FR_DIALOGTERM| FRX_FINDALL)

Definition at line 160 of file StdDlg.h.

◆ FR_OPTIONMASK

#define FR_OPTIONMASK   (FR_DOWN| FR_MATCHCASE| FR_WHOLEWORD)

Definition at line 161 of file StdDlg.h.

◆ BIF_DEFAULT

#define BIF_DEFAULT   (BIF_RETURNONLYFSDIRS| BIF_NEWDIALOGSTYLE| BIF_EDITBOX)

Definition at line 297 of file StdDlg.h.

Typedef Documentation

◆ PFileDialog

typedef class FileDialog* PFileDialog

Definition at line 23 of file StdDlg.h.

◆ PDirDialog

typedef class DirDialog* PDirDialog

Definition at line 24 of file StdDlg.h.

◆ PFindDialog

typedef class FindDialog* PFindDialog

Definition at line 25 of file StdDlg.h.

◆ PFontDialog

typedef class FontDialog* PFontDialog

Definition at line 26 of file StdDlg.h.

◆ PColorDialog

typedef class ColorDialog* PColorDialog

Definition at line 27 of file StdDlg.h.

◆ FDLG_ItemProc

typedef bool(CALLBACK * FDLG_ItemProc) (CSTR FileName, PVOID UserData)

FDLG_ItemProc is the callback function type for FileDialog::ForEach().
Return false to stop enumeration.

Parameters
FileNameFull pathname of a file.
UserDataWhatever you passed in to ForEach.

Definition at line 79 of file StdDlg.h.

Function Documentation

◆ CDErrorMsg()

ACSTR CDErrorMsg ( DWORD  Err = 0)

Return a common dialog error mnemonic.

Definition at line 23 of file StdDlg.cpp.

Variable Documentation

◆ WM_CommonHelp

UINT WM_CommonHelp

Registered HELPMSGSTRING. All common dialog boxes send this.

Definition at line 13 of file StdDlg.cpp.

◆ WM_FileOk

UINT WM_FileOk

Registered FILEOKSTRING. An Open or Save As dialog box sends this.

Definition at line 14 of file StdDlg.cpp.

◆ WM_SelChange

UINT WM_SelChange

Registered LBSELCHSTRING. An Open or Save As dialog box sends this.

Definition at line 15 of file StdDlg.cpp.

◆ WM_ShareViolation

UINT WM_ShareViolation

Registered SHAREVISTRING. An Open or Save As dialog box sends this.

Definition at line 16 of file StdDlg.cpp.

◆ WM_FindReplace

UINT WM_FindReplace

Registered FINDMSGSTRING. A Find or Replace dialog box sends this.

Definition at line 17 of file StdDlg.cpp.

◆ WM_ColorOk

UINT WM_ColorOk

Registered COLOROKSTRING. A Color dialog box sends this.

Definition at line 18 of file StdDlg.cpp.

◆ WM_SetRGB

UINT WM_SetRGB

Registered SETRGBSTRING. A hook procedure can send this.

Definition at line 19 of file StdDlg.cpp.

◆ ALLFILE_FILTER

const CSTR ALLFILE_FILTER

"All Files\0*.*\0"

Definition at line 83 of file StdDlg.cpp.