feat: finish FileFilters class in dialog helper.

- finish FileFilters class representing the file types area in popup dialog.
This commit is contained in:
2024-05-22 15:53:46 +08:00
parent b8a56efd7c
commit 359aff82ac
4 changed files with 140 additions and 0 deletions

View File

@ -52,9 +52,23 @@ namespace Testbench {
}
static void DialogTestbench() {
YYCC::DialogHelper::FileFilters test;
test.Add("Microsoft Word (*.docx; *.doc)", {"*.docx", "*.doc"});
test.Add("Microsoft Excel (*.xlsx; *.xls)", {"*.xlsx", "*.xls"});
test.Add("Microsoft PowerPoint (*.pptx; *.ppt)", {"*.pptx", "*.ppt"});
test.Add("Text File (*.*)", {"*.txt"});
test.Add("All Files (*.*)", {"*.*"});
UINT count;
COMDLG_FILTERSPEC* specs;
bool ret = test.Generate(count, specs);
}
}
int main(int argc, char** args) {
Testbench::TerminalTestbench();
Testbench::StringTestbench();
Testbench::DialogTestbench();
}