mCtrl
0.9.6
|
Go to the source code of this file.
Dialog functions.
This module offers functions for creation of modal and modeless dialogs in ery similar manner as standard functions DialogBox
and CreateDialog
do.
Therefore mCtrl functions are very similar to their USER32.DLL
counterparts, including their function name and parameters. Actually the only difference is that the mCtrl functions take an extra argument dwFlags
. When the dwFlags
is zero, the functions behave exactly as the original functions.
When set to non-zero, the functions provide new functionality. Currently only the flag MC_DF_DEFAULTFONT
is supported. When set, it forces the dialog to use default font, as defined by MS user interface guide lines.
All the functions support the classic dialog templates (DLGTEMPLATE
) as well as the extended dialog templates (DLGTEMPLATEEX
).
Dialog flags | |
#define | MC_DF_DEFAULTFONT 0x00000001 |
Force a default font into the dialog template. More... | |
Modeless dialog functions | |
#define | mcCreateDialogW(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwFlags) |
#define | mcCreateDialogA(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwFlags) |
#define | mcCreateDialogIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc, dwFlags) |
#define | mcCreateDialogIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc, dwFlags) |
HWND | mcCreateDialogParamW (HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
HWND | mcCreateDialogParamA (HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
HWND | mcCreateDialogIndirectParamW (HINSTANCE hInstance, LPCDLGTEMPLATEW lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
HWND | mcCreateDialogIndirectParamA (HINSTANCE hInstance, LPCDLGTEMPLATEA lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
Modal dialog functions | |
#define | mcDialogBoxW(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwFlags) |
#define | mcDialogBoxA(hInstance, lpTemplateName, hWndParent, lpDialogFunc, dwFlags) |
#define | mcDialogBoxIndirectW(hInstance, lpTemplate, hWndParent, lpDialogFunc, dwFlags) |
#define | mcDialogBoxIndirectA(hInstance, lpTemplate, hWndParent, lpDialogFunc, dwFlags) |
INT_PTR | mcDialogBoxParamW (HINSTANCE hInstance, LPCWSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
INT_PTR | mcDialogBoxParamA (HINSTANCE hInstance, LPCSTR lpTemplateName, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
INT_PTR | mcDialogBoxIndirectParamW (HINSTANCE hInstance, LPCDLGTEMPLATEW lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
INT_PTR | mcDialogBoxIndirectParamA (HINSTANCE hInstance, LPCDLGTEMPLATEA lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc, LPARAM lParamInit, DWORD dwFlags) |
Unicode Resolution | |
#define | mcCreateDialogParam MCTRL_NAME_AW(mcCreateDialogParam) |
#define | mcCreateDialog MCTRL_NAME_AW(mcCreateDialog) |
#define | mcCreateDialogIndirectParam MCTRL_NAME_AW(mcCreateDialogIndirectParam) |
#define | mcCreateDialogIndirect MCTRL_NAME_AW(mcCreateDialogIndirect) |
#define | mcDialogBoxParam MCTRL_NAME_AW(mcDialogBoxParam) |
#define | mcDialogBox MCTRL_NAME_AW(mcDialogBox) |
#define | mcDialogBoxIndirectParam MCTRL_NAME_AW(mcDialogBoxIndirectParam) |
#define | mcDialogBoxIndirect MCTRL_NAME_AW(mcDialogBoxIndirect) |
#define MC_DF_DEFAULTFONT 0x00000001 |
Force a default font into the dialog template.
When this flag is set, the dialog template is modified so the dialog uses a default font for the particular Windows version, according to the MS user interface guide lines.
Depending on Windows version, it forces the template to use MS Shell Dlg
, MS Shell Dlg 2
or Segoe UI
.
Note that when using this flag, the font specified originally in the dialog template is used only as a fallback in case of any error.
#define mcCreateDialogW | ( | hInstance, | |
lpTemplateName, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates modeless dialog (Unicode variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
NULL
on error. #define mcCreateDialogA | ( | hInstance, | |
lpTemplateName, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates modeless dialog (ANSI variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
NULL
on error. #define mcCreateDialogIndirectW | ( | hInstance, | |
lpTemplate, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates modeless dialog (Unicode variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
NULL
on error. #define mcCreateDialogIndirectA | ( | hInstance, | |
lpTemplate, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates modeless dialog (ANSI variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
NULL
on error. #define mcDialogBoxW | ( | hInstance, | |
lpTemplateName, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates and runs modal dialog (Unicode variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. #define mcDialogBoxA | ( | hInstance, | |
lpTemplateName, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates and runs modal dialog (ANSI variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. #define mcDialogBoxIndirectW | ( | hInstance, | |
lpTemplate, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates and runs modal dialog (Unicode variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. #define mcDialogBoxIndirectA | ( | hInstance, | |
lpTemplate, | |||
hWndParent, | |||
lpDialogFunc, | |||
dwFlags | |||
) |
Creates and runs modal dialog (ANSI variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. #define mcCreateDialogParam MCTRL_NAME_AW(mcCreateDialogParam) |
Unicode-resolution alias.
#define mcCreateDialog MCTRL_NAME_AW(mcCreateDialog) |
Unicode-resolution alias.
#define mcCreateDialogIndirectParam MCTRL_NAME_AW(mcCreateDialogIndirectParam) |
Unicode-resolution alias.
#define mcCreateDialogIndirect MCTRL_NAME_AW(mcCreateDialogIndirect) |
Unicode-resolution alias.
#define mcDialogBoxParam MCTRL_NAME_AW(mcDialogBoxParam) |
Unicode-resolution alias.
#define mcDialogBox MCTRL_NAME_AW(mcDialogBox) |
Unicode-resolution alias.
#define mcDialogBoxIndirectParam MCTRL_NAME_AW(mcDialogBoxIndirectParam) |
Unicode-resolution alias.
#define mcDialogBoxIndirect MCTRL_NAME_AW(mcDialogBoxIndirect) |
Unicode-resolution alias.
HWND mcCreateDialogParamW | ( | HINSTANCE | hInstance, |
LPCWSTR | lpTemplateName, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates modeless dialog (Unicode variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
NULL
on error. HWND mcCreateDialogParamA | ( | HINSTANCE | hInstance, |
LPCSTR | lpTemplateName, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates modeless dialog (ANSI variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
NULL
on error. HWND mcCreateDialogIndirectParamW | ( | HINSTANCE | hInstance, |
LPCDLGTEMPLATEW | lpTemplate, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates modeless dialog (Unicode variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
NULL
on error. HWND mcCreateDialogIndirectParamA | ( | HINSTANCE | hInstance, |
LPCDLGTEMPLATEA | lpTemplate, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates modeless dialog (ANSI variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
NULL
on error. INT_PTR mcDialogBoxParamW | ( | HINSTANCE | hInstance, |
LPCWSTR | lpTemplateName, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates and runs modal dialog (Unicode variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. INT_PTR mcDialogBoxParamA | ( | HINSTANCE | hInstance, |
LPCSTR | lpTemplateName, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates and runs modal dialog (ANSI variant).
hInstance | |
lpTemplateName | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. INT_PTR mcDialogBoxIndirectParamW | ( | HINSTANCE | hInstance, |
LPCDLGTEMPLATEW | lpTemplate, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates and runs modal dialog (Unicode variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails. INT_PTR mcDialogBoxIndirectParamA | ( | HINSTANCE | hInstance, |
LPCDLGTEMPLATEA | lpTemplate, | ||
HWND | hWndParent, | ||
DLGPROC | lpDialogFunc, | ||
LPARAM | lParamInit, | ||
DWORD | dwFlags | ||
) |
Creates and runs modal dialog (ANSI variant).
hInstance | |
lpTemplate | |
hWndParent | |
lpDialogFunc | |
lParamInit | |
dwFlags | Dialog flags. |
EndDialog
, or -1
if the function fails.