···
GetClientRect(hwnd, &rect);
196
+
// Create double buffer to eliminate flicker
197
+
HDC memDC = CreateCompatibleDC(hdc);
198
+
HBITMAP memBitmap = CreateCompatibleBitmap(hdc, rect.right, rect.bottom);
199
+
HBITMAP oldBitmap = (HBITMAP)SelectObject(memDC, memBitmap);
// Update VU levels before drawing
201
-
DrawRadioInterface(hdc, &rect);
206
+
DrawRadioInterface(memDC, &rect);
208
+
// Copy from memory DC to screen
209
+
BitBlt(hdc, 0, 0, rect.right, rect.bottom, memDC, 0, 0, SRCCOPY);
212
+
SelectObject(memDC, oldBitmap);
213
+
DeleteObject(memBitmap);
···
401
-
// Timer for VU meter updates
414
+
// Timer for VU meter updates - only invalidate VU meter area
403
-
InvalidateRect(hwnd, NULL, FALSE);
416
+
RECT vuRect = {440, 190, 540, 250};
417
+
InvalidateRect(hwnd, &vuRect, FALSE);
···
FillRect(hdc, rect, darkBrush);
418
-
// Main panel with metallic gradient effect
432
+
// Main panel with simplified metallic gradient effect
RECT panel = {10, 10, rect->right - 10, rect->bottom - 10};
421
-
// Create gradient effect by drawing multiple rectangles
422
-
for (int i = 0; i < 20; i++) {
423
-
int gray = 45 + i * 2;
435
+
// Simplified gradient effect with fewer steps
436
+
for (int i = 0; i < 8; i++) {
437
+
int gray = 45 + i * 3;
HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray));
RECT gradRect = {panel.left + i, panel.top + i, panel.right - i, panel.bottom - i};
FrameRect(hdc, &gradRect, gradBrush);
···
void DrawTuningDial(HDC hdc, int x, int y, int radius, float frequency) {
580
-
// Metallic dial with chrome gradient
581
-
for (int i = 0; i < 8; i++) {
582
-
int gray = 80 + i * 10;
594
+
// Simplified metallic dial with fewer gradient steps
595
+
for (int i = 0; i < 4; i++) {
596
+
int gray = 80 + i * 20;
HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray));
SelectObject(hdc, gradBrush);
585
-
Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i);
599
+
Ellipse(hdc, x - radius + i*2, y - radius + i*2, x + radius - i*2, y + radius - i*2);
···
648
-
// Chrome-style pointer with shadow
662
+
// Simplified pointer
float normalizedFreq = (frequency - 10.0f) / 24.0f;
float angle = -3.14159f * 0.75f + normalizedFreq * (3.14159f * 1.5f);
int pointerX = x + (int)((radius - 15) * cos(angle));
int pointerY = y + (int)((radius - 15) * sin(angle));
655
-
HPEN shadowPen = CreatePen(PS_SOLID, 4, RGB(32, 32, 32));
656
-
SelectObject(hdc, shadowPen);
657
-
MoveToEx(hdc, x + 1, y + 1, NULL);
658
-
LineTo(hdc, pointerX + 1, pointerY + 1);
659
-
DeleteObject(shadowPen);
HPEN pointerPen = CreatePen(PS_SOLID, 3, RGB(255, 64, 64));
SelectObject(hdc, pointerPen);
···
void DrawVolumeKnob(HDC hdc, int x, int y, int radius, float volume) {
689
-
// Chrome gradient knob
690
-
for (int i = 0; i < 6; i++) {
691
-
int gray = 100 + i * 15;
696
+
// Simplified chrome gradient knob
697
+
for (int i = 0; i < 3; i++) {
698
+
int gray = 100 + i * 30;
HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray));
SelectObject(hdc, gradBrush);
694
-
Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i);
701
+
Ellipse(hdc, x - radius + i*2, y - radius + i*2, x + radius - i*2, y + radius - i*2);
···
Ellipse(hdc, x - radius, y - radius, x + radius, y + radius);
710
-
// Volume indicator with glow
717
+
// Volume indicator
float angle = volume * 3.14159f * 1.5f - 3.14159f * 0.75f;
int indicatorX = x + (int)((radius - 8) * cos(angle));
int indicatorY = y + (int)((radius - 8) * sin(angle));
715
-
// Indicator shadow
716
-
HPEN shadowPen = CreatePen(PS_SOLID, 3, RGB(32, 32, 32));
717
-
SelectObject(hdc, shadowPen);
718
-
MoveToEx(hdc, x + 1, y + 1, NULL);
719
-
LineTo(hdc, indicatorX + 1, indicatorY + 1);
720
-
DeleteObject(shadowPen);
HPEN indicatorPen = CreatePen(PS_SOLID, 2, RGB(255, 255, 255));
···
void DrawPowerButton(HDC hdc, int x, int y, int radius, int power) {
921
-
// Chrome gradient button
922
-
for (int i = 0; i < 6; i++) {
923
-
int intensity = power ? (80 + i * 20) : (60 + i * 10);
924
-
COLORREF buttonColor = power ? RGB(255 - i * 20, intensity, intensity) : RGB(intensity, intensity, intensity);
921
+
// Simplified chrome gradient button
922
+
for (int i = 0; i < 3; i++) {
923
+
int intensity = power ? (80 + i * 40) : (60 + i * 20);
924
+
COLORREF buttonColor = power ? RGB(255 - i * 40, intensity, intensity) : RGB(intensity, intensity, intensity);
HBRUSH buttonBrush = CreateSolidBrush(buttonColor);
SelectObject(hdc, buttonBrush);
927
-
Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i);
927
+
Ellipse(hdc, x - radius + i*2, y - radius + i*2, x + radius - i*2, y + radius - i*2);
DeleteObject(buttonBrush);
···
Ellipse(hdc, x - radius, y - radius, x + radius, y + radius);
944
-
// Power symbol with glow effect
947
-
HPEN glowPen = CreatePen(PS_SOLID, 5, RGB(255, 64, 64));
948
-
SelectObject(hdc, glowPen);
949
-
Arc(hdc, x - 10, y - 10, x + 10, y + 10, x + 8, y - 8, x - 8, y - 8);
950
-
MoveToEx(hdc, x, y - 12, NULL);
951
-
LineTo(hdc, x, y - 4);
952
-
DeleteObject(glowPen);
HPEN symbolPen = CreatePen(PS_SOLID, 3, RGB(255, 255, 255));
SelectObject(hdc, symbolPen);