summaryrefslogtreecommitdiff
path: root/alf/alf.h
diff options
context:
space:
mode:
authorJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-24 11:19:34 +0200
committerJonas Kümmerlin <jonas@kuemmerlin.eu>2020-06-24 11:19:34 +0200
commitcd9b72745abd06012777f130f1f19c4ae853489d (patch)
treec2bbf90ea7618d82faae560d42f268f62567168a /alf/alf.h
parent02c1f4e9165084589941ce205defaf5f3f1ea90f (diff)
messagedlg: initial implementation
Diffstat (limited to 'alf/alf.h')
-rw-r--r--alf/alf.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/alf/alf.h b/alf/alf.h
index 6140e60..8969ee1 100644
--- a/alf/alf.h
+++ b/alf/alf.h
@@ -160,6 +160,15 @@ ALF_ReAlloc(void *ptr, SIZE_T nmemb, SIZE_T size);
void
ALF_Free(const void *p);
+TCHAR *
+ALF_StrDup(const TCHAR *psz);
+
+TCHAR *
+ALF_StrOrIntresourceDup(const TCHAR *psz);
+
+void
+ALF_StrOrIntresourceFree(const TCHAR *psz);
+
COLORREF
ALF_ColorToGdi(ALFColor color);
@@ -611,6 +620,42 @@ ALF_LoadIcon(HINSTANCE hinst, const TCHAR *name, int cx, int cy);
SIZE
ALF_IconSize(HICON icon);
+// custom message box
+HWND
+ALF_MessageDlg_Create(HWND owner);
+
+void
+ALF_MessageDlg_SetCaption(HWND msg, const TCHAR *caption);
+
+void
+ALF_MessageDlg_SetText(HWND msg, const TCHAR *text);
+
+void
+ALF_MessageDlg_SetIcon(HWND msg, HINSTANCE hinst, const TCHAR *name);
+
+void
+ALF_MessageDlg_AddButton(HWND msg, WORD id, const TCHAR *text);
+
+WORD
+ALF_MessageDlg_Run(HWND msg);
+
+// message box shortcuts
+void
+ALF_MessageDlg_Error(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText);
+
+void
+ALF_MessageDlg_Warning(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText);
+
+void
+ALF_MessageDlg_Information(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText);
+
+WORD // IDOK or IDCANCEL
+ALF_MessageDlg_Confirm(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText, const TCHAR *cancelBtnText);
+
+// like ALF_MessageDlg_Confirm, but shows an exclamation icon and preselects the cancel button
+WORD
+ALF_MessageDlg_ConfirmDanger(HWND owner, const TCHAR *text, const TCHAR *caption, const TCHAR *okBtnText, const TCHAR *cancelBtnText);
+
#ifdef __cplusplus
} // extern C