msacm32: In format chosse dialog, get rid of static variables, and store information as a property of dialog.
This commit is contained in:
parent
ca3afdc156
commit
03ab4bea9c
|
@ -39,8 +39,6 @@
|
||||||
|
|
||||||
WINE_DEFAULT_DEBUG_CHANNEL(msacm);
|
WINE_DEFAULT_DEBUG_CHANNEL(msacm);
|
||||||
|
|
||||||
static PACMFORMATCHOOSEA afc;
|
|
||||||
|
|
||||||
struct MSACM_FillFormatData {
|
struct MSACM_FillFormatData {
|
||||||
HWND hWnd;
|
HWND hWnd;
|
||||||
#define WINE_ACMFF_TAG 0
|
#define WINE_ACMFF_TAG 0
|
||||||
|
@ -195,20 +193,24 @@ static MMRESULT MSACM_GetWFX(HWND hWnd, PACMFORMATCHOOSEA afc)
|
||||||
return affd.ret;
|
return affd.ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char* fmt_prop = "acmprop";
|
||||||
|
|
||||||
static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
|
static INT_PTR CALLBACK FormatChooseDlgProc(HWND hWnd, UINT msg,
|
||||||
WPARAM wParam, LPARAM lParam)
|
WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
|
PACMFORMATCHOOSEA afc = (PACMFORMATCHOOSEA)GetPropA(hWnd, fmt_prop);
|
||||||
|
|
||||||
TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam);
|
TRACE("hwnd=%p msg=%i 0x%08lx 0x%08lx\n", hWnd, msg, wParam, lParam);
|
||||||
|
|
||||||
switch (msg) {
|
switch (msg) {
|
||||||
case WM_INITDIALOG:
|
case WM_INITDIALOG:
|
||||||
afc = (PACMFORMATCHOOSEA)lParam;
|
afc = (PACMFORMATCHOOSEA)lParam;
|
||||||
|
SetPropA(hWnd, fmt_prop, (HANDLE)afc);
|
||||||
MSACM_FillFormatTags(hWnd);
|
MSACM_FillFormatTags(hWnd);
|
||||||
MSACM_FillFormat(hWnd);
|
MSACM_FillFormat(hWnd);
|
||||||
if ((afc->fdwStyle & ~(ACMFORMATCHOOSE_STYLEF_CONTEXTHELP|
|
if ((afc->fdwStyle & ~(ACMFORMATCHOOSE_STYLEF_CONTEXTHELP|
|
||||||
ACMFORMATCHOOSE_STYLEF_SHOWHELP)) != 0)
|
ACMFORMATCHOOSE_STYLEF_SHOWHELP)) != 0)
|
||||||
FIXME("Unsupported style %08x\n", ((PACMFORMATCHOOSEA)lParam)->fdwStyle);
|
FIXME("Unsupported style %08x\n", afc->fdwStyle);
|
||||||
if (!(afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP))
|
if (!(afc->fdwStyle & ACMFORMATCHOOSE_STYLEF_SHOWHELP))
|
||||||
ShowWindow(GetDlgItem(hWnd, IDD_ACMFORMATCHOOSE_BTN_HELP), SW_HIDE);
|
ShowWindow(GetDlgItem(hWnd, IDD_ACMFORMATCHOOSE_BTN_HELP), SW_HIDE);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Reference in New Issue