2 * COMMDLG - Color Dialog
4 * Copyright 1994 Martin Ayotte
5 * Copyright 1996 Albrecht Kleine
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 /* BUGS : still seems to not refresh correctly
23 sometimes, especially when 2 instances of the
24 dialog are loaded at the same time */
36 #include "wine/debug.h"
39 WINE_DEFAULT_DEBUG_CHANNEL(commdlg
);
42 /***********************************************************************
43 * ColorDlgProc (COMMDLG.8)
45 BOOL16 CALLBACK
ColorDlgProc16( HWND16 hDlg16
, UINT16 message
, WPARAM16 wParam
, LPARAM lParam
)
47 FIXME( "%04x %04x %04x %08Ix: stub\n", hDlg16
, message
, wParam
, lParam
);
51 /***********************************************************************
52 * ChooseColor (COMMDLG.5)
54 BOOL16 WINAPI
ChooseColor16( LPCHOOSECOLOR16 cc16
)
59 cc32
.lStructSize
= sizeof(cc32
);
60 cc32
.hwndOwner
= HWND_32( cc16
->hwndOwner
);
61 cc32
.rgbResult
= cc16
->rgbResult
;
62 cc32
.lpCustColors
= MapSL( cc16
->lpCustColors
);
63 cc32
.Flags
= cc16
->Flags
& ~(CC_ENABLETEMPLATE
| CC_ENABLETEMPLATEHANDLE
| CC_ENABLEHOOK
);
64 cc32
.lCustData
= cc16
->lCustData
;
65 cc32
.hInstance
= NULL
;
67 cc32
.lpTemplateName
= NULL
;
69 if (cc16
->Flags
& (CC_ENABLETEMPLATE
| CC_ENABLETEMPLATEHANDLE
))
70 FIXME( "custom templates no longer supported, using default\n" );
71 if (cc16
->Flags
& CC_ENABLEHOOK
)
72 FIXME( "custom hook %p no longer supported\n", cc16
->lpfnHook
);
74 if ((ret
= ChooseColorA( &cc32
)))
76 cc16
->rgbResult
= cc32
.rgbResult
;