/*1* COMMDLG - Color Dialog2*3* Copyright 1994 Martin Ayotte4* Copyright 1996 Albrecht Kleine5*6* This library is free software; you can redistribute it and/or7* modify it under the terms of the GNU Lesser General Public8* License as published by the Free Software Foundation; either9* version 2.1 of the License, or (at your option) any later version.10*11* This library is distributed in the hope that it will be useful,12* but WITHOUT ANY WARRANTY; without even the implied warranty of13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU14* Lesser General Public License for more details.15*16* You should have received a copy of the GNU Lesser General Public17* License along with this library; if not, write to the Free Software18* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA19*/2021/* BUGS : still seems to not refresh correctly22sometimes, especially when 2 instances of the23dialog are loaded at the same time */2425#include <ctype.h>26#include <stdlib.h>27#include <stdarg.h>28#include <stdio.h>29#include <string.h>30#include "windef.h"31#include "winbase.h"32#include "wingdi.h"33#include "winuser.h"34#include "commdlg.h"35#include "wine/debug.h"36#include "cdlg16.h"3738WINE_DEFAULT_DEBUG_CHANNEL(commdlg);394041/***********************************************************************42* ColorDlgProc (COMMDLG.8)43*/44BOOL16 CALLBACK ColorDlgProc16( HWND16 hDlg16, UINT16 message, WPARAM16 wParam, LPARAM lParam )45{46FIXME( "%04x %04x %04x %08Ix: stub\n", hDlg16, message, wParam, lParam );47return FALSE;48}4950/***********************************************************************51* ChooseColor (COMMDLG.5)52*/53BOOL16 WINAPI ChooseColor16( LPCHOOSECOLOR16 cc16 )54{55CHOOSECOLORA cc32;56BOOL ret;5758cc32.lStructSize = sizeof(cc32);59cc32.hwndOwner = HWND_32( cc16->hwndOwner );60cc32.rgbResult = cc16->rgbResult;61cc32.lpCustColors = MapSL( cc16->lpCustColors );62cc32.Flags = cc16->Flags & ~(CC_ENABLETEMPLATE | CC_ENABLETEMPLATEHANDLE | CC_ENABLEHOOK);63cc32.lCustData = cc16->lCustData;64cc32.hInstance = NULL;65cc32.lpfnHook = NULL;66cc32.lpTemplateName = NULL;6768if (cc16->Flags & (CC_ENABLETEMPLATE | CC_ENABLETEMPLATEHANDLE))69FIXME( "custom templates no longer supported, using default\n" );70if (cc16->Flags & CC_ENABLEHOOK)71FIXME( "custom hook %p no longer supported\n", cc16->lpfnHook );7273if ((ret = ChooseColorA( &cc32 )))74{75cc16->rgbResult = cc32.rgbResult;76}77return ret;78}798081