diff options
author | Guy Harris <guy@alum.mit.edu> | 2016-07-23 01:56:12 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2016-07-23 08:57:22 +0000 |
commit | c9329ff0ec9c6ade928100564e7c04f1e11125df (patch) | |
tree | 4c58ff612277b83ca23a1113fbc49740a8869890 /ui/win32 | |
parent | 0aaff397fbd1ac860fbb54873b09adf7616ee3b5 (diff) |
Suggest using a task dialog, so we can label the buttons.
Change-Id: I2827ab8b5d4a9c17e6c178d9397fcf897a356c9f
Reviewed-on: https://code.wireshark.org/review/16603
Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'ui/win32')
-rw-r--r-- | ui/win32/file_dlg_win32.c | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/ui/win32/file_dlg_win32.c b/ui/win32/file_dlg_win32.c index 9cae316314..90aa684dae 100644 --- a/ui/win32/file_dlg_win32.c +++ b/ui/win32/file_dlg_win32.c @@ -272,24 +272,22 @@ win32_check_save_as_with_comments(HWND parent, capture_file *cf, int file_type) format you selected", or "Cancel", meaning "don't bother saving the file at all". - XXX - sadly, customizing buttons in a MessageBox() is - Really Painful; there are tricks out there to do it - with a "computer-based training" hook that gets called - before the window is activated and sets the text of the - buttons, but if you change the text of the buttons you - also have to make the buttons bigger. There *has* to - be a better way of doing that, given that Microsoft's - own UI guidelines have examples of dialog boxes with - action buttons that have custom labels, but maybe we'd - have to go with Windows Forms or XAML or whatever the - heck the technology of the week is. - - Therefore, we ask a yes-or-no question - "do you want - to discard the comments and save in the format you - chose?" - and have "no" mean "I want to save the - file but I don't want to discard the comments, meaning - we should reopen the dialog and not offer the user any - choices that would involve discarding the comments. */ + XXX - given that we no longer support releases prior to + Windows Vista, we should use a task dialog: + + https://msdn.microsoft.com/en-us/library/windows/desktop/ff486057(v=vs.85).aspx + + created with TaskDialogIndirect(): + + https://msdn.microsoft.com/en-us/library/windows/desktop/bb760544(v=vs.85).aspx + + because the TASKDIALOGCONFIG structure + + https://msdn.microsoft.com/en-us/library/windows/desktop/bb787473(v=vs.85).aspx + + supports adding custom buttons, with custom labels, unlike + a MessageBox(), which doesn't appear to offer a clean way to + do that. */ response = MessageBox(parent, _T("The capture has comments, but the file format you chose ") _T("doesn't support comments. Do you want to discard the comments ") |