Re: [PATCH 3/3] [Msacm32]: in acmFormatChoose, added support for template
Eric Pouech <eric.pouech(a)orange.fr> wrote:
MMRESULT WINAPI acmFormatChooseW(PACMFORMATCHOOSEW pafmtc) { - return DialogBoxParamW(MSACM_hInstance32, MAKEINTRESOURCEW(DLG_ACMFORMATCHOOSE_ID), - pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc); + MMRESULT ret; + + if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATEHANDLE) + ret = DialogBoxIndirectParamW(MSACM_hInstance32, (LPCDLGTEMPLATEW)pafmtc->hInstance, + pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc); + else if (pafmtc->fdwStyle & ACMFORMATCHOOSE_STYLEF_ENABLETEMPLATE) + ret = DialogBoxParamW(pafmtc->hInstance, pafmtc->pszTemplateName, + pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc); + else + ret = DialogBoxParamW(MSACM_hInstance32, MAKEINTRESOURCEW(DLG_ACMFORMATCHOOSE_ID), + pafmtc->hwndOwner, FormatChooseDlgProc, (LPARAM)pafmtc); + return ret; }
It would look much better without all those 'ret' + 'else' things. -- Dmitry.
It would look much better without all those 'ret' + 'else' things. well, wine doesn't have coding guidelines... so I don't know what "look much better" means (project wise)
A+ -- Eric Pouech
Eric Pouech <eric.pouech(a)orange.fr> wrote:
It would look much better without all those 'ret' + 'else' things. well, wine doesn't have coding guidelines... so I don't know what "look much better" means (project wise)
For this particalr patch it means: 1. less code 2. simpler code 3. more readable code and has nothing to do with coding guidelines for the whole project. P.S. I didn't even ask about the point in adding a bunch of spaces between 'MMRESULT' and 'ret' :) -- Dmitry.
Le 13/08/2012 09:51, Dmitry Timoshkov a écrit :
Eric Pouech <eric.pouech(a)orange.fr> wrote:
It would look much better without all those 'ret' + 'else' things. well, wine doesn't have coding guidelines... so I don't know what "look much better" means (project wise) For this particalr patch it means:
1. less code 2. simpler code 3. more readable code
and has nothing to do with coding guidelines for the whole project.
P.S. I didn't even ask about the point in adding a bunch of spaces between 'MMRESULT' and 'ret' :)
feel free to do it. I won't A+
participants (2)
-
Dmitry Timoshkov -
Eric Pouech