Author: janderwald
Date: Thu Oct 25 23:40:27 2007
New Revision: 29883
URL:
http://svn.reactos.org/svn/reactos?rev=29883&view=rev
Log:
- Draw color quality indicator in Display Properties -> Settings
- patch by Vytis Girdzijauskas, "CMan", cman[at]cman[dot]us
See issue #2762 for more details.
Added:
trunk/reactos/dll/cpl/desk/resources/spectrum.bmp (with props)
Modified:
trunk/reactos/dll/cpl/desk/desk.rc
trunk/reactos/dll/cpl/desk/lang/bg-BG.rc
trunk/reactos/dll/cpl/desk/lang/cs-CZ.rc
trunk/reactos/dll/cpl/desk/lang/de-DE.rc
trunk/reactos/dll/cpl/desk/lang/el-GR.rc
trunk/reactos/dll/cpl/desk/lang/en-US.rc
trunk/reactos/dll/cpl/desk/lang/es-ES.rc
trunk/reactos/dll/cpl/desk/lang/fr-FR.rc
trunk/reactos/dll/cpl/desk/lang/hu-HU.rc
trunk/reactos/dll/cpl/desk/lang/id-ID.rc
trunk/reactos/dll/cpl/desk/lang/it-IT.rc
trunk/reactos/dll/cpl/desk/lang/ja-JP.rc
trunk/reactos/dll/cpl/desk/lang/nl-NL.rc
trunk/reactos/dll/cpl/desk/lang/pl-PL.rc
trunk/reactos/dll/cpl/desk/lang/ru-RU.rc
trunk/reactos/dll/cpl/desk/lang/sk-SK.rc
trunk/reactos/dll/cpl/desk/lang/sv-SE.rc
trunk/reactos/dll/cpl/desk/lang/uk-UA.rc
trunk/reactos/dll/cpl/desk/resource.h
trunk/reactos/dll/cpl/desk/settings.c
Modified: trunk/reactos/dll/cpl/desk/desk.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/desk.rc?rev=2…
==============================================================================
--- trunk/reactos/dll/cpl/desk/desk.rc (original)
+++ trunk/reactos/dll/cpl/desk/desk.rc Thu Oct 25 23:40:27 2007
@@ -15,5 +15,6 @@
IDC_DESK_ICON ICON "resources/applet.ico"
IDC_DESK_ICON2 ICON "resources/applet.ico"
IDC_MONITOR BITMAP "resources/monitor.bmp"
+IDB_SPECTRUM BITMAP "resources/spectrum.bmp"
#include "rsrc.rc"
Modified: trunk/reactos/dll/cpl/desk/lang/bg-BG.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/bg-BG.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/bg-BG.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/bg-BG.rc Thu Oct 25 23:40:27 2007
@@ -116,8 +116,7 @@
GROUPBOX "&Öâåòîâå",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Ðàç&øèðåíè...",IDC_SETTINGS_ADVANCED,306,165,56,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/cs-CZ.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/cs-CZ.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/cs-CZ.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/cs-CZ.rc Thu Oct 25 23:40:27 2007
@@ -113,8 +113,7 @@
GROUPBOX "&Poèet barev",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "R&ozíøené
nastavení...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/de-DE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/de-DE.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/de-DE.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/de-DE.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "&Farbqualität",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Erweitert",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/el-GR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/el-GR.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/el-GR.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/el-GR.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "&×ñþìáôá",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Ãéá
&ðñï÷ùñçìÝíïõò...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/en-US.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/en-US.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/en-US.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/en-US.rc Thu Oct 25 23:40:27 2007
@@ -114,8 +114,7 @@
GROUPBOX "&Colors",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Ad&vanced...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/es-ES.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/es-ES.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/es-ES.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/es-ES.rc Thu Oct 25 23:40:27 2007
@@ -119,8 +119,7 @@
GROUPBOX "&Calidad de color",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "A&vanzado...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/fr-FR.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/fr-FR.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/fr-FR.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/fr-FR.rc Thu Oct 25 23:40:27 2007
@@ -115,8 +115,7 @@
GROUPBOX "&Couleurs",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "A&vancé...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/hu-HU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/hu-HU.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/hu-HU.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/hu-HU.rc Thu Oct 25 23:40:27 2007
@@ -113,8 +113,7 @@
GROUPBOX "&Színek",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Haladóknak...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/id-ID.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/id-ID.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/id-ID.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/id-ID.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "&Warna",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Lanjutan...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/it-IT.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/it-IT.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/it-IT.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/it-IT.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "&Colori",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "A&vanzate...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/ja-JP.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/ja-JP.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/ja-JP.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/ja-JP.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "F(&C)",1817,125,160,115,43
COMBOBOX IDC_SETTINGS_BPP,131,170,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,188,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Ú×Ýè(&V)...",IDC_SETTINGS_ADVANCED,170,205,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/nl-NL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/nl-NL.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/nl-NL.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/nl-NL.rc Thu Oct 25 23:40:27 2007
@@ -114,8 +114,7 @@
GROUPBOX "&Kleuren",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Geavanceerd...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/pl-PL.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/pl-PL.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/pl-PL.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/pl-PL.rc Thu Oct 25 23:40:27 2007
@@ -118,8 +118,7 @@
GROUPBOX "&Jakoæ kolorów",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Zaawa&nsowane...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/ru-RU.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/ru-RU.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/ru-RU.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/ru-RU.rc Thu Oct 25 23:40:27 2007
@@ -112,8 +112,7 @@
GROUPBOX "&Êà÷åñòâî öâåòîïåðåäà÷è",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Äî&ïîëíèòåëüíî",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/sk-SK.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/sk-SK.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/sk-SK.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/sk-SK.rc Thu Oct 25 23:40:27 2007
@@ -121,8 +121,7 @@
GROUPBOX "&Farby",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Spresni...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/sv-SE.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/sv-SE.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/sv-SE.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/sv-SE.rc Thu Oct 25 23:40:27 2007
@@ -115,8 +115,7 @@
GROUPBOX "&Färger",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,138,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "&Avancerat...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/lang/uk-UA.rc
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/lang/uk-UA.rc…
==============================================================================
--- trunk/reactos/dll/cpl/desk/lang/uk-UA.rc (original)
+++ trunk/reactos/dll/cpl/desk/lang/uk-UA.rc Thu Oct 25 23:40:27 2007
@@ -120,8 +120,7 @@
GROUPBOX "&ßê³ñòü êîëüîðîïåðåäà÷³",1817,125,120,115,43
COMBOBOX IDC_SETTINGS_BPP,131,130,103,80,CBS_DROPDOWNLIST | CBS_AUTOHSCROLL |
WS_VSCROLL | WS_TABSTOP
- CONTROL "",1813,"Static",SS_BITMAP | SS_CENTERIMAGE |
SS_SUNKEN,
- 131,148,103,9
+ CONTROL "",IDC_SETTINGS_SPECTRUM,"Static",SS_OWNERDRAW |
SS_SUNKEN,131,148,103,9
PUSHBUTTON "Äîä&àòêîâî...",IDC_SETTINGS_ADVANCED,170,165,70,14
END
Modified: trunk/reactos/dll/cpl/desk/resource.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resource.h?re…
==============================================================================
--- trunk/reactos/dll/cpl/desk/resource.h (original)
+++ trunk/reactos/dll/cpl/desk/resource.h Thu Oct 25 23:40:27 2007
@@ -65,6 +65,8 @@
#define IDC_SETTINGS_RESOLUTION_TEXT 204
#define IDC_SETTINGS_ADVANCED 205
#define IDC_SETTINGS_MONSEL 206
+#define IDC_SETTINGS_SPECTRUM 207
+#define IDB_SPECTRUM 208
#define IDR_PREVIEW_MENU 2100
#define ID_MENU_NORMAL 2101
@@ -159,3 +161,4 @@
#endif /* __CPL_DESK_RESOURCE_H__ */
+
Added: trunk/reactos/dll/cpl/desk/resources/spectrum.bmp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/resources/spe…
==============================================================================
Binary file - no diff available.
Propchange: trunk/reactos/dll/cpl/desk/resources/spectrum.bmp
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: trunk/reactos/dll/cpl/desk/settings.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/desk/settings.c?re…
==============================================================================
--- trunk/reactos/dll/cpl/desk/settings.c (original)
+++ trunk/reactos/dll/cpl/desk/settings.c Thu Oct 25 23:40:27 2007
@@ -16,6 +16,9 @@
PDISPLAY_DEVICE_ENTRY DisplayDeviceList;
PDISPLAY_DEVICE_ENTRY CurrentDisplayDevice;
} GLOBAL_DATA, *PGLOBAL_DATA;
+
+static HBITMAP hBitmap = NULL;
+static int cxSource, cySource;
static VOID
UpdateDisplay(IN HWND hwndDlg, PGLOBAL_DATA pGlobalData, IN BOOL bUpdateThumb)
@@ -558,11 +561,43 @@
pGlobalData = (PGLOBAL_DATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
+ BITMAP bitmap;
+
switch(uMsg)
{
case WM_INITDIALOG:
+ {
OnInitDialog(hwndDlg);
+
+ hBitmap = LoadImageW(hApplet, MAKEINTRESOURCEW(IDB_SPECTRUM), IMAGE_BITMAP, 0, 0,
LR_DEFAULTCOLOR);
+ if (hBitmap != NULL)
+ {
+ GetObjectW(hBitmap, sizeof(BITMAP), &bitmap);
+
+ cxSource = bitmap.bmWidth;
+ cySource = bitmap.bmHeight;
+ }
break;
+ }
+ case WM_DRAWITEM:
+ {
+ LPDRAWITEMSTRUCT lpDrawItem;
+ lpDrawItem = (LPDRAWITEMSTRUCT) lParam;
+ if(lpDrawItem->CtlID == IDC_SETTINGS_SPECTRUM)
+ {
+ HDC hdcMem;
+ hdcMem = CreateCompatibleDC(lpDrawItem->hDC);
+ if (hdcMem != NULL)
+ {
+ SelectObject(hdcMem, hBitmap);
+ StretchBlt(lpDrawItem->hDC, lpDrawItem->rcItem.left,
lpDrawItem->rcItem.top,
+ lpDrawItem->rcItem.right - lpDrawItem->rcItem.left,
+ lpDrawItem->rcItem.bottom - lpDrawItem->rcItem.top,
+ hdcMem, 0, 0, cxSource, cySource, SRCCOPY);
+ DeleteDC(hdcMem);
+ }
+ }
+ }
case WM_COMMAND:
{
DWORD controlId = LOWORD(wParam);
@@ -762,6 +797,8 @@
}
HeapFree(GetProcessHeap(), 0, pGlobalData);
+
+ DeleteObject(hBitmap);
}
}
return FALSE;