Commit Graph
3 Commits
Author SHA1 Message Date
Claude 44713f5258 cdlgtest: type the color and click the underline box
Under Wine the color dialog kept its first color after SETRGBSTRING,
and the font dialog reads Underline when the box is clicked, not when
it is checked. The test now types all three color fields, and checks
the box with a click as a user would.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-18 23:26:38 +00:00
Claude 2bc74b056e cdlgtest: type the name in edt1 where there is no cmb13
Wine's file dialog has the name box as edt1, as the older dialogs do,
so the name never reached it and the test waited until it timed out.
The test also logs each dialog as it starts, so that a hang shows
where.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-18 23:13:01 +00:00
Claude c3057ec339 Add the common dialogs to the portable layer
GetOpenFileName, GetSaveFileName, ChooseColor, ChooseFont, FindText
and ReplaceText (A and W) were stubs that failed. They are now the
layer's own dialogs, built from templates in memory with the control
identifiers of <dlgs.h>:

- Open and Save As list the folders and files of the file system with
  POSIX paths, filtered by the filter's patterns, with the folder chain,
  Up, multiple selection, the default extension, the existence and
  overwrite checks, Explorer-style hooks and templates in a child dialog
  (the CDN_ notifications and CDM_ messages), and FNERR_BUFFERTOOSMALL.
- Color has basic and custom swatches, the RGB and HSL fields by their
  usual numbers, SETRGBSTRING and COLOROKSTRING.
- Font lists the faces EnumFontFamiliesEx gives, with styles, sizes,
  effects, a sample and WM_CHOOSEFONT_GETLOGFONT.
- Find and Replace are modeless and send FINDMSGSTRING to their owner.

CommDlgExtendedError covers them all. dlgs.h gains the rest of the
stc, lst, cmb and edt identifiers, and commdlg.h the CFERR, FNERR,
FRERR and CCERR codes.

In the library, CCommonDialog's OK and Cancel go on to the dialog's
own procedure, so that a modeless CFindReplaceDialog closes, and
CFileDialog's GetFolderPath and GetNextPathName handle '/' paths.

tests/cdlgtest drives each dialog through its hooks; it runs natively
and under Wine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B82eRRw4kkFHrrHRhkcuLw
Signed-off-by: Claude <noreply@anthropic.com>
2026-11-18 22:50:04 +00:00