OFN_ALLOWMULTISELECT
OFN_CREATEPROMPT
OFN_DONTADDTORECENT
OFN_ENABLEHOOK
OFN_ENABLEINCLUDENOTIFY
OFN_ENABLESIZING
OFN_ENABLETEMPLATE
OFN_ENABLETEMPLATEHANDLE
OFN_EXPLORER
OFN_EXTENSIONDIFFERENT
OFN_FILEMUSTEXIST
OFN_FORCESHOWHIDDEN
OFN_HIDEREADONLY
OFN_LONGNAMES
OFN_NOCHANGEDIR
OFN_NODEREFERENCELINKS
OFN_NOLONGNAMES
OFN_NONETWORKBUTTON
OFN_NOREADONLYRETURN
OFN_NOTESTFILECREATE
OFN_NOVALIDATE
OFN_OVERWRITEPROMPT
OFN_PATHMUSTEXIST
OFN_READONLY
OFN_SHAREAWARE
OFN_SHOWHELP
OFN_USESHELLITEM
lpstrFile;
lpstrFilter;
FIGURE 12.2 Parameters to con?¬?gure a Windows ???Save As??? dialog
314 DOMAIN FRAMEWORK
We would thus want to look at refactoring that repeated block of code out into
its own function in the domain framework. The function would set up some desired
defaults for the majority of parameters, and have its own parameters for a few
features of the dialog that vary. The generated code will thus be much shorter in each
case, easier to read, and easier to relate to the data in the model. At the same time
this approach will also harmonize the use of ?¬?le dialogs, removing unnecessary
variation??”necessary variation will of course be captured in the parameters and
speci?¬?ed in the models.
12.2 HIDING PLATFORM DETAILS
Modern software development is based in a large part on existing general-purpose
components, often supplied as part of a development platform such as Java JDK or
Windows .
Pages:
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589