po: Update Spanish translation.
[wine/multimedia.git] / dlls / commdlg.dll16 / colordlg.c
blob845784e9ed41787ed7b59e5fa4e1bac8dd9e427d
1 /*
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 */
26 #include <ctype.h>
27 #include <stdlib.h>
28 #include <stdarg.h>
29 #include <stdio.h>
30 #include <string.h>
31 #include "windef.h"
32 #include "winbase.h"
33 #include "wingdi.h"
34 #include "winuser.h"
35 #include "commdlg.h"
36 #include "wine/debug.h"
37 #include "cdlg16.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 %08lx: stub\n", hDlg16, message, wParam, lParam );
48 return FALSE;
51 /***********************************************************************
52 * ChooseColor (COMMDLG.5)
54 BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 cc16 )
56 CHOOSECOLORA cc32;
57 BOOL ret;
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;
66 if (cc16->Flags & (CC_ENABLETEMPLATE | CC_ENABLETEMPLATEHANDLE))
67 FIXME( "custom templates no longer supported, using default\n" );
68 if (cc16->Flags & CC_ENABLEHOOK)
69 FIXME( "custom hook %p no longer supported\n", cc16->lpfnHook );
71 if ((ret = ChooseColorA( &cc32 )))
73 cc16->rgbResult = cc32.rgbResult;
75 return ret;