Beispiel #1
0
bool CSetDlgColors::ColorEditDialog(HWND hWnd2, WORD c)
{
	_ASSERTE(hWnd2!=NULL);
	bool bChanged = false;
	COLORREF color = 0;
	GetColorById(c, &color);
	//wchar_t temp[16];
	COLORREF colornew = color;

	if (ShowColorDialog(ghOpWnd, &colornew) && colornew != color)
	{
		SetColorById(c, colornew);
		//_wsprintf(temp, SKIPLEN(countof(temp)) L"%i %i %i", getR(colornew), getG(colornew), getB(colornew));
		//SetDlgItemText(hWnd2, c + (tc0-c0), temp);
		ColorSetEdit(hWnd2, c);
		CSettings::InvalidateCtrl(GetDlgItem(hWnd2, c), TRUE);
		bChanged = true;
	}

	return bChanged;
}
void
on_color_dialog_button_clicked         (GtkButton       *button,
                                        gpointer         user_data)
{
	ShowColorDialog(g_color_dialog);
}