a mega cool windows xp app
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: seriously improve the looks

dunkirk.sh cf999246 72e0da47

verified
+359 -186
+359 -186
main.cpp
··· 117 wc.lpfnWndProc = WindowProc; 118 wc.hInstance = hInstance; 119 wc.lpszClassName = CLASS_NAME; 120 - wc.hbrBackground = CreateSolidBrush(RGB(101, 67, 33)); // Wood grain brown 121 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 122 123 RegisterClass(&wc); ··· 410 } 411 412 void DrawRadioInterface(HDC hdc, RECT* rect) { 413 - // Create vintage radio background 414 - HBRUSH woodBrush = CreateSolidBrush(RGB(101, 67, 33)); 415 - FillRect(hdc, rect, woodBrush); 416 - DeleteObject(woodBrush); 417 418 - // Draw radio panel (darker inset) 419 - RECT panel = {50, 50, rect->right - 50, rect->bottom - 50}; 420 - HBRUSH panelBrush = CreateSolidBrush(RGB(80, 50, 25)); 421 - FillRect(hdc, &panel, panelBrush); 422 - DeleteObject(panelBrush); 423 424 - // Draw panel border (raised effect) 425 - HPEN lightPen = CreatePen(PS_SOLID, 2, RGB(140, 100, 60)); 426 - HPEN darkPen = CreatePen(PS_SOLID, 2, RGB(40, 25, 15)); 427 428 SelectObject(hdc, lightPen); 429 - MoveToEx(hdc, panel.left, panel.bottom, NULL); 430 - LineTo(hdc, panel.left, panel.top); 431 - LineTo(hdc, panel.right, panel.top); 432 433 SelectObject(hdc, darkPen); 434 - LineTo(hdc, panel.right, panel.bottom); 435 - LineTo(hdc, panel.left, panel.bottom); 436 437 DeleteObject(lightPen); 438 DeleteObject(darkPen); 439 440 - // Draw frequency display 441 DrawFrequencyDisplay(hdc, 200, 80, g_radio.frequency); 442 443 - // Draw tuning dial 444 DrawTuningDial(hdc, 150, 200, 60, g_radio.frequency); 445 446 - // Draw volume knob 447 DrawVolumeKnob(hdc, 350, 200, 30, g_radio.volume); 448 449 - // Draw signal meter 450 DrawSignalMeter(hdc, 450, 170, g_radio.signalStrength); 451 452 - // Draw VU meter 453 DrawVUMeter(hdc, 450, 200, g_audio.vuLevelLeft, g_audio.vuLevelRight); 454 455 - // Draw power button 456 DrawPowerButton(hdc, 500, 120, 25, g_radio.power); 457 458 - // Draw station info if tuned to a station 459 RadioStation* currentStation = FindNearestStation(g_radio.frequency); 460 if (currentStation && g_radio.signalStrength > 30) { 461 - RECT stationRect = {80, 320, 520, 360}; 462 - HBRUSH stationBrush = CreateSolidBrush(RGB(0, 0, 0)); 463 - FillRect(hdc, &stationRect, stationBrush); 464 - DeleteObject(stationBrush); 465 466 - HPEN stationPen = CreatePen(PS_SOLID, 1, RGB(100, 100, 100)); 467 - SelectObject(hdc, stationPen); 468 - Rectangle(hdc, stationRect.left, stationRect.top, stationRect.right, stationRect.bottom); 469 - DeleteObject(stationPen); 470 471 SetTextColor(hdc, RGB(0, 255, 0)); 472 - HFONT stationFont = CreateFont(12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, 473 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 474 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 475 - DEFAULT_PITCH | FF_SWISS, "Arial"); 476 SelectObject(hdc, stationFont); 477 478 char stationText[256]; ··· 480 currentStation->frequency, currentStation->name, currentStation->description); 481 482 SetTextAlign(hdc, TA_LEFT); 483 - TextOut(hdc, stationRect.left + 5, stationRect.top + 5, stationText, strlen(stationText)); 484 485 DeleteObject(stationFont); 486 } 487 - 488 } 489 490 void DrawFrequencyDisplay(HDC hdc, int x, int y, float frequency) { 491 - // Draw display background (black LCD style) 492 - RECT display = {x - 80, y - 20, x + 80, y + 20}; 493 HBRUSH blackBrush = CreateSolidBrush(RGB(0, 0, 0)); 494 FillRect(hdc, &display, blackBrush); 495 DeleteObject(blackBrush); 496 497 - // Draw display border 498 - HPEN borderPen = CreatePen(PS_SOLID, 1, RGB(100, 100, 100)); 499 - SelectObject(hdc, borderPen); 500 - Rectangle(hdc, display.left, display.top, display.right, display.bottom); 501 - DeleteObject(borderPen); 502 503 - // Draw frequency text 504 char freqText[32]; 505 sprintf(freqText, "%.3f MHz", frequency); 506 507 SetBkMode(hdc, TRANSPARENT); 508 - SetTextColor(hdc, RGB(0, 255, 0)); // Green LCD color 509 - HFONT lcdFont = CreateFont(16, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 510 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 511 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 512 - FIXED_PITCH | FF_MODERN, "Courier New"); 513 SelectObject(hdc, lcdFont); 514 515 - SetTextAlign(hdc, TA_CENTER); 516 - TextOut(hdc, x, y - 8, freqText, strlen(freqText)); 517 518 DeleteObject(lcdFont); 519 } 520 521 void DrawTuningDial(HDC hdc, int x, int y, int radius, float frequency) { 522 - // Draw dial background 523 - HBRUSH dialBrush = CreateSolidBrush(RGB(160, 120, 80)); 524 SelectObject(hdc, dialBrush); 525 - Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 526 DeleteObject(dialBrush); 527 528 - // Draw dial border 529 - HPEN borderPen = CreatePen(PS_SOLID, 2, RGB(60, 40, 20)); 530 - SelectObject(hdc, borderPen); 531 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 532 - DeleteObject(borderPen); 533 534 - // Draw tick marks and frequency markings (270 degree sweep) 535 - HPEN tickPen = CreatePen(PS_SOLID, 1, RGB(60, 40, 20)); 536 SelectObject(hdc, tickPen); 537 538 // Draw major tick marks and frequency labels 539 SetTextColor(hdc, RGB(0, 0, 0)); 540 - HFONT smallFont = CreateFont(10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, 541 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 542 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 543 - DEFAULT_PITCH | FF_SWISS, "Arial"); 544 SelectObject(hdc, smallFont); 545 SetTextAlign(hdc, TA_CENTER); 546 ··· 549 float angle = -3.14159f * 0.75f + (float)i * (3.14159f * 1.5f) / 11.0f; 550 551 // Major tick marks 552 - int tickStartX = x + (int)((radius - 8) * cos(angle)); 553 - int tickStartY = y + (int)((radius - 8) * sin(angle)); 554 - int tickEndX = x + (int)((radius - 2) * cos(angle)); 555 - int tickEndY = y + (int)((radius - 2) * sin(angle)); 556 MoveToEx(hdc, tickStartX, tickStartY, NULL); 557 LineTo(hdc, tickEndX, tickEndY); 558 559 // Frequency labels 560 - int markX = x + (int)((radius - 18) * cos(angle)); 561 - int markY = y + (int)((radius - 18) * sin(angle)); 562 char mark[8]; 563 sprintf(mark, "%d", 10 + i * 2); 564 - TextOut(hdc, markX, markY - 5, mark, strlen(mark)); 565 } 566 567 - // Draw minor tick marks between major ones 568 for (int i = 0; i < 11; i++) { 569 float angle = -3.14159f * 0.75f + ((float)i + 0.5f) * (3.14159f * 1.5f) / 11.0f; 570 - int tickStartX = x + (int)((radius - 5) * cos(angle)); 571 - int tickStartY = y + (int)((radius - 5) * sin(angle)); 572 - int tickEndX = x + (int)((radius - 2) * cos(angle)); 573 - int tickEndY = y + (int)((radius - 2) * sin(angle)); 574 MoveToEx(hdc, tickStartX, tickStartY, NULL); 575 LineTo(hdc, tickEndX, tickEndY); 576 } 577 578 - // Draw range limit markers at start and end positions 579 - HPEN limitPen = CreatePen(PS_SOLID, 2, RGB(255, 0, 0)); 580 - SelectObject(hdc, limitPen); 581 - 582 - // Start position (-135 degrees, 10 MHz) 583 - float startAngle = -3.14159f * 0.75f; 584 - int startX = x + (int)((radius - 12) * cos(startAngle)); 585 - int startY = y + (int)((radius - 12) * sin(startAngle)); 586 - int startEndX = x + (int)(radius * cos(startAngle)); 587 - int startEndY = y + (int)(radius * sin(startAngle)); 588 - MoveToEx(hdc, startX, startY, NULL); 589 - LineTo(hdc, startEndX, startEndY); 590 - 591 - // End position (+135 degrees, 34 MHz) 592 - float endAngle = 3.14159f * 0.75f; 593 - int endX = x + (int)((radius - 12) * cos(endAngle)); 594 - int endY = y + (int)((radius - 12) * sin(endAngle)); 595 - int endEndX = x + (int)(radius * cos(endAngle)); 596 - int endEndY = y + (int)(radius * sin(endAngle)); 597 - MoveToEx(hdc, endX, endY, NULL); 598 - LineTo(hdc, endEndX, endEndY); 599 - 600 DeleteObject(tickPen); 601 - DeleteObject(limitPen); 602 603 - // Draw pointer based on frequency (270 degree sweep) 604 float normalizedFreq = (frequency - 10.0f) / 24.0f; 605 float angle = -3.14159f * 0.75f + normalizedFreq * (3.14159f * 1.5f); 606 - int pointerX = x + (int)((radius - 10) * cos(angle)); 607 - int pointerY = y + (int)((radius - 10) * sin(angle)); 608 609 - HPEN pointerPen = CreatePen(PS_SOLID, 3, RGB(255, 0, 0)); 610 SelectObject(hdc, pointerPen); 611 MoveToEx(hdc, x, y, NULL); 612 LineTo(hdc, pointerX, pointerY); 613 DeleteObject(pointerPen); 614 615 DeleteObject(smallFont); 616 617 - // Draw label below the dial 618 - SetBkMode(hdc, TRANSPARENT); 619 - SetTextColor(hdc, RGB(255, 255, 255)); 620 - HFONT labelFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 621 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 622 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 623 - DEFAULT_PITCH | FF_SWISS, "Arial"); 624 SelectObject(hdc, labelFont); 625 SetTextAlign(hdc, TA_CENTER); 626 TextOut(hdc, x, y + radius + 15, "TUNING", 6); ··· 628 } 629 630 void DrawVolumeKnob(HDC hdc, int x, int y, int radius, float volume) { 631 - // Draw knob background 632 - HBRUSH knobBrush = CreateSolidBrush(RGB(140, 100, 60)); 633 SelectObject(hdc, knobBrush); 634 - Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 635 DeleteObject(knobBrush); 636 637 - // Draw knob border 638 - HPEN borderPen = CreatePen(PS_SOLID, 1, RGB(60, 40, 20)); 639 - SelectObject(hdc, borderPen); 640 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 641 - DeleteObject(borderPen); 642 643 - // Draw volume indicator 644 float angle = volume * 3.14159f * 1.5f - 3.14159f * 0.75f; 645 - int indicatorX = x + (int)((radius - 5) * cos(angle)); 646 - int indicatorY = y + (int)((radius - 5) * sin(angle)); 647 648 HPEN indicatorPen = CreatePen(PS_SOLID, 2, RGB(255, 255, 255)); 649 SelectObject(hdc, indicatorPen); 650 MoveToEx(hdc, x, y, NULL); 651 LineTo(hdc, indicatorX, indicatorY); 652 DeleteObject(indicatorPen); 653 654 - // Draw label below the knob 655 SetBkMode(hdc, TRANSPARENT); 656 - SetTextColor(hdc, RGB(255, 255, 255)); 657 - HFONT labelFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 658 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 659 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 660 - DEFAULT_PITCH | FF_SWISS, "Arial"); 661 SelectObject(hdc, labelFont); 662 SetTextAlign(hdc, TA_CENTER); 663 TextOut(hdc, x, y + radius + 15, "VOLUME", 6); ··· 665 } 666 667 void DrawSignalMeter(HDC hdc, int x, int y, int strength) { 668 - // Draw meter background 669 RECT meter = {x, y, x + 80, y + 20}; 670 - HBRUSH meterBrush = CreateSolidBrush(RGB(0, 0, 0)); 671 FillRect(hdc, &meter, meterBrush); 672 DeleteObject(meterBrush); 673 674 - // Draw meter border 675 - HPEN borderPen = CreatePen(PS_SOLID, 1, RGB(100, 100, 100)); 676 - SelectObject(hdc, borderPen); 677 - Rectangle(hdc, meter.left, meter.top, meter.right, meter.bottom); 678 - DeleteObject(borderPen); 679 680 - // Draw signal bars 681 - int barWidth = 8; 682 int numBars = strength / 10; 683 for (int i = 0; i < numBars && i < 10; i++) { 684 - RECT bar = {x + 2 + i * barWidth, y + 2, 685 - x + 2 + (i + 1) * barWidth - 1, y + 18}; 686 687 COLORREF barColor; 688 - if (i < 3) barColor = RGB(0, 255, 0); // Green 689 - else if (i < 7) barColor = RGB(255, 255, 0); // Yellow 690 - else barColor = RGB(255, 0, 0); // Red 691 692 HBRUSH barBrush = CreateSolidBrush(barColor); 693 FillRect(hdc, &bar, barBrush); 694 DeleteObject(barBrush); 695 } 696 697 - // Draw label above the meter 698 SetBkMode(hdc, TRANSPARENT); 699 - SetTextColor(hdc, RGB(255, 255, 255)); 700 - HFONT labelFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 701 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 702 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 703 - DEFAULT_PITCH | FF_SWISS, "Arial"); 704 SelectObject(hdc, labelFont); 705 SetTextAlign(hdc, TA_LEFT); 706 - TextOut(hdc, x, y - 18, "SIGNAL", 6); 707 DeleteObject(labelFont); 708 } 709 710 void DrawVUMeter(HDC hdc, int x, int y, float leftLevel, float rightLevel) { 711 - // Draw VU meter background 712 RECT meterBg = {x, y, x + 80, y + 40}; 713 - HBRUSH bgBrush = CreateSolidBrush(RGB(20, 20, 20)); 714 FillRect(hdc, &meterBg, bgBrush); 715 DeleteObject(bgBrush); 716 717 - // Draw border 718 - HPEN borderPen = CreatePen(PS_SOLID, 1, RGB(100, 100, 100)); 719 - SelectObject(hdc, borderPen); 720 - Rectangle(hdc, meterBg.left, meterBg.top, meterBg.right, meterBg.bottom); 721 - DeleteObject(borderPen); 722 723 - // Draw "VU" label 724 - SetTextColor(hdc, RGB(200, 200, 200)); 725 SetBkMode(hdc, TRANSPARENT); 726 - HFONT smallFont = CreateFont(10, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, 727 - DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 728 - CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 729 - DEFAULT_PITCH | FF_SWISS, "Arial"); 730 - SelectObject(hdc, smallFont); 731 - TextOut(hdc, x + 9, y + 2, "VU", 2); 732 733 - // Draw left channel meter 734 - int leftWidth = (int)(leftLevel * 70); 735 if (leftWidth > 0) { 736 - RECT leftBar = {x + 5, y + 12, x + 5 + leftWidth, y + 18}; 737 - COLORREF leftColor = leftLevel > 0.8f ? RGB(255, 0, 0) : 738 - leftLevel > 0.6f ? RGB(255, 255, 0) : RGB(0, 255, 0); 739 HBRUSH leftBrush = CreateSolidBrush(leftColor); 740 FillRect(hdc, &leftBar, leftBrush); 741 DeleteObject(leftBrush); 742 } 743 744 - // Draw right channel meter 745 - int rightWidth = (int)(rightLevel * 70); 746 if (rightWidth > 0) { 747 - RECT rightBar = {x + 5, y + 22, x + 5 + rightWidth, y + 28}; 748 - COLORREF rightColor = rightLevel > 0.8f ? RGB(255, 0, 0) : 749 - rightLevel > 0.6f ? RGB(255, 255, 0) : RGB(0, 255, 0); 750 HBRUSH rightBrush = CreateSolidBrush(rightColor); 751 FillRect(hdc, &rightBar, rightBrush); 752 DeleteObject(rightBrush); 753 } 754 755 - // Draw channel labels (better positioned) 756 - TextOut(hdc, x + 77, y + 12, "L", 1); 757 - TextOut(hdc, x + 77, y + 22, "R", 1); 758 759 - // Draw scale marks 760 - HPEN scalePen = CreatePen(PS_SOLID, 1, RGB(80, 80, 80)); 761 SelectObject(hdc, scalePen); 762 for (int i = 1; i < 10; i++) { 763 - int markX = x + 5 + (i * 7); 764 MoveToEx(hdc, markX, y + 30, NULL); 765 LineTo(hdc, markX, y + 32); 766 } 767 DeleteObject(scalePen); 768 - DeleteObject(smallFont); 769 } 770 771 void DrawPowerButton(HDC hdc, int x, int y, int radius, int power) { 772 - // Draw button background 773 - COLORREF buttonColor = power ? RGB(255, 0, 0) : RGB(100, 100, 100); 774 - HBRUSH buttonBrush = CreateSolidBrush(buttonColor); 775 - SelectObject(hdc, buttonBrush); 776 - Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 777 - DeleteObject(buttonBrush); 778 779 - // Draw button border 780 - HPEN borderPen = CreatePen(PS_SOLID, 2, RGB(60, 60, 60)); 781 SelectObject(hdc, borderPen); 782 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 783 DeleteObject(borderPen); 784 785 - // Draw power symbol 786 if (power) { 787 HPEN symbolPen = CreatePen(PS_SOLID, 3, RGB(255, 255, 255)); 788 SelectObject(hdc, symbolPen); 789 - 790 - // Draw power symbol (circle with line) 791 Arc(hdc, x - 8, y - 8, x + 8, y + 8, x + 6, y - 6, x - 6, y - 6); 792 MoveToEx(hdc, x, y - 10, NULL); 793 LineTo(hdc, x, y - 2); 794 - 795 DeleteObject(symbolPen); 796 } 797 798 - // Draw label above the button 799 SetBkMode(hdc, TRANSPARENT); 800 - SetTextColor(hdc, RGB(255, 255, 255)); 801 - HFONT labelFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 802 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 803 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 804 - DEFAULT_PITCH | FF_SWISS, "Arial"); 805 SelectObject(hdc, labelFont); 806 SetTextAlign(hdc, TA_CENTER); 807 TextOut(hdc, x, y - radius - 18, "POWER", 5);
··· 117 wc.lpfnWndProc = WindowProc; 118 wc.hInstance = hInstance; 119 wc.lpszClassName = CLASS_NAME; 120 + wc.hbrBackground = CreateSolidBrush(RGB(24, 24, 24)); // Dark Winamp-style background 121 wc.hCursor = LoadCursor(NULL, IDC_ARROW); 122 123 RegisterClass(&wc); ··· 410 } 411 412 void DrawRadioInterface(HDC hdc, RECT* rect) { 413 + // Winamp-style dark gradient background 414 + HBRUSH darkBrush = CreateSolidBrush(RGB(24, 24, 24)); 415 + FillRect(hdc, rect, darkBrush); 416 + DeleteObject(darkBrush); 417 418 + // Main panel with metallic gradient effect 419 + RECT panel = {10, 10, rect->right - 10, rect->bottom - 10}; 420 + 421 + // Create gradient effect by drawing multiple rectangles 422 + for (int i = 0; i < 20; i++) { 423 + int gray = 45 + i * 2; 424 + HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray)); 425 + RECT gradRect = {panel.left + i, panel.top + i, panel.right - i, panel.bottom - i}; 426 + FrameRect(hdc, &gradRect, gradBrush); 427 + DeleteObject(gradBrush); 428 + } 429 430 + // Inner panel with darker metallic look 431 + RECT innerPanel = {30, 30, rect->right - 30, rect->bottom - 30}; 432 + HBRUSH innerBrush = CreateSolidBrush(RGB(32, 32, 32)); 433 + FillRect(hdc, &innerPanel, innerBrush); 434 + DeleteObject(innerBrush); 435 + 436 + // Winamp-style beveled border 437 + HPEN lightPen = CreatePen(PS_SOLID, 1, RGB(128, 128, 128)); 438 + HPEN darkPen = CreatePen(PS_SOLID, 1, RGB(16, 16, 16)); 439 440 SelectObject(hdc, lightPen); 441 + MoveToEx(hdc, innerPanel.left, innerPanel.bottom, NULL); 442 + LineTo(hdc, innerPanel.left, innerPanel.top); 443 + LineTo(hdc, innerPanel.right, innerPanel.top); 444 445 SelectObject(hdc, darkPen); 446 + LineTo(hdc, innerPanel.right, innerPanel.bottom); 447 + LineTo(hdc, innerPanel.left, innerPanel.bottom); 448 449 DeleteObject(lightPen); 450 DeleteObject(darkPen); 451 452 + // Draw frequency display with Winamp-style LCD 453 DrawFrequencyDisplay(hdc, 200, 80, g_radio.frequency); 454 455 + // Draw tuning dial with metallic look 456 DrawTuningDial(hdc, 150, 200, 60, g_radio.frequency); 457 458 + // Draw volume knob with chrome effect 459 DrawVolumeKnob(hdc, 350, 200, 30, g_radio.volume); 460 461 + // Draw signal meter with neon bars 462 DrawSignalMeter(hdc, 450, 170, g_radio.signalStrength); 463 464 + // Draw VU meter with classic Winamp style 465 DrawVUMeter(hdc, 450, 200, g_audio.vuLevelLeft, g_audio.vuLevelRight); 466 467 + // Draw power button with LED glow 468 DrawPowerButton(hdc, 500, 120, 25, g_radio.power); 469 470 + // Draw station info with Winamp-style ticker 471 RadioStation* currentStation = FindNearestStation(g_radio.frequency); 472 if (currentStation && g_radio.signalStrength > 30) { 473 + RECT stationRect = {50, 320, 550, 360}; 474 + 475 + // Winamp-style display background 476 + HBRUSH displayBrush = CreateSolidBrush(RGB(0, 0, 0)); 477 + FillRect(hdc, &stationRect, displayBrush); 478 + DeleteObject(displayBrush); 479 480 + // Beveled border 481 + HPEN lightBorderPen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64)); 482 + HPEN darkBorderPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); 483 + 484 + SelectObject(hdc, darkBorderPen); 485 + MoveToEx(hdc, stationRect.left, stationRect.bottom, NULL); 486 + LineTo(hdc, stationRect.left, stationRect.top); 487 + LineTo(hdc, stationRect.right, stationRect.top); 488 + 489 + SelectObject(hdc, lightBorderPen); 490 + LineTo(hdc, stationRect.right, stationRect.bottom); 491 + LineTo(hdc, stationRect.left, stationRect.bottom); 492 + 493 + DeleteObject(lightBorderPen); 494 + DeleteObject(darkBorderPen); 495 496 + // Winamp-style green text 497 SetTextColor(hdc, RGB(0, 255, 0)); 498 + SetBkMode(hdc, TRANSPARENT); 499 + HFONT stationFont = CreateFont(14, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 500 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 501 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 502 + DEFAULT_PITCH | FF_MODERN, "Tahoma"); 503 SelectObject(hdc, stationFont); 504 505 char stationText[256]; ··· 507 currentStation->frequency, currentStation->name, currentStation->description); 508 509 SetTextAlign(hdc, TA_LEFT); 510 + TextOut(hdc, stationRect.left + 10, stationRect.top + 12, stationText, strlen(stationText)); 511 512 DeleteObject(stationFont); 513 } 514 } 515 516 void DrawFrequencyDisplay(HDC hdc, int x, int y, float frequency) { 517 + // Winamp-style LCD display with beveled edges 518 + RECT display = {x - 100, y - 25, x + 100, y + 25}; 519 + 520 + // Dark background 521 HBRUSH blackBrush = CreateSolidBrush(RGB(0, 0, 0)); 522 FillRect(hdc, &display, blackBrush); 523 DeleteObject(blackBrush); 524 525 + // Beveled border effect 526 + HPEN lightPen = CreatePen(PS_SOLID, 2, RGB(96, 96, 96)); 527 + HPEN darkPen = CreatePen(PS_SOLID, 2, RGB(32, 32, 32)); 528 + 529 + SelectObject(hdc, darkPen); 530 + MoveToEx(hdc, display.left, display.bottom, NULL); 531 + LineTo(hdc, display.left, display.top); 532 + LineTo(hdc, display.right, display.top); 533 534 + SelectObject(hdc, lightPen); 535 + LineTo(hdc, display.right, display.bottom); 536 + LineTo(hdc, display.left, display.bottom); 537 + 538 + DeleteObject(lightPen); 539 + DeleteObject(darkPen); 540 + 541 + // Inner shadow 542 + RECT innerDisplay = {display.left + 3, display.top + 3, display.right - 3, display.bottom - 3}; 543 + HPEN shadowPen = CreatePen(PS_SOLID, 1, RGB(16, 16, 16)); 544 + SelectObject(hdc, shadowPen); 545 + Rectangle(hdc, innerDisplay.left, innerDisplay.top, innerDisplay.right, innerDisplay.bottom); 546 + DeleteObject(shadowPen); 547 + 548 + // Frequency text with glow effect 549 char freqText[32]; 550 sprintf(freqText, "%.3f MHz", frequency); 551 552 SetBkMode(hdc, TRANSPARENT); 553 + 554 + // Create glow effect by drawing text multiple times with slight offsets 555 + HFONT lcdFont = CreateFont(20, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 556 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 557 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 558 + FIXED_PITCH | FF_MODERN, "Consolas"); 559 SelectObject(hdc, lcdFont); 560 + SetTextAlign(hdc, TA_CENTER); 561 562 + // Glow effect (dark green) 563 + SetTextColor(hdc, RGB(0, 128, 0)); 564 + for (int dx = -1; dx <= 1; dx++) { 565 + for (int dy = -1; dy <= 1; dy++) { 566 + if (dx != 0 || dy != 0) { 567 + TextOut(hdc, x + dx, y - 10 + dy, freqText, strlen(freqText)); 568 + } 569 + } 570 + } 571 + 572 + // Main text (bright green) 573 + SetTextColor(hdc, RGB(0, 255, 0)); 574 + TextOut(hdc, x, y - 10, freqText, strlen(freqText)); 575 576 DeleteObject(lcdFont); 577 } 578 579 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; 583 + HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray)); 584 + SelectObject(hdc, gradBrush); 585 + Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i); 586 + DeleteObject(gradBrush); 587 + } 588 + 589 + // Inner dial surface 590 + HBRUSH dialBrush = CreateSolidBrush(RGB(160, 160, 160)); 591 SelectObject(hdc, dialBrush); 592 + Ellipse(hdc, x - radius + 8, y - radius + 8, x + radius - 8, y + radius - 8); 593 DeleteObject(dialBrush); 594 595 + // Outer ring 596 + HPEN ringPen = CreatePen(PS_SOLID, 2, RGB(48, 48, 48)); 597 + SelectObject(hdc, ringPen); 598 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 599 + DeleteObject(ringPen); 600 601 + // Tick marks with better contrast 602 + HPEN tickPen = CreatePen(PS_SOLID, 2, RGB(0, 0, 0)); 603 SelectObject(hdc, tickPen); 604 605 // Draw major tick marks and frequency labels 606 SetTextColor(hdc, RGB(0, 0, 0)); 607 + SetBkMode(hdc, TRANSPARENT); 608 + HFONT smallFont = CreateFont(9, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 609 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 610 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 611 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 612 SelectObject(hdc, smallFont); 613 SetTextAlign(hdc, TA_CENTER); 614 ··· 617 float angle = -3.14159f * 0.75f + (float)i * (3.14159f * 1.5f) / 11.0f; 618 619 // Major tick marks 620 + int tickStartX = x + (int)((radius - 12) * cos(angle)); 621 + int tickStartY = y + (int)((radius - 12) * sin(angle)); 622 + int tickEndX = x + (int)((radius - 4) * cos(angle)); 623 + int tickEndY = y + (int)((radius - 4) * sin(angle)); 624 MoveToEx(hdc, tickStartX, tickStartY, NULL); 625 LineTo(hdc, tickEndX, tickEndY); 626 627 // Frequency labels 628 + int markX = x + (int)((radius - 22) * cos(angle)); 629 + int markY = y + (int)((radius - 22) * sin(angle)); 630 char mark[8]; 631 sprintf(mark, "%d", 10 + i * 2); 632 + TextOut(hdc, markX, markY - 4, mark, strlen(mark)); 633 } 634 635 + // Draw minor tick marks 636 for (int i = 0; i < 11; i++) { 637 float angle = -3.14159f * 0.75f + ((float)i + 0.5f) * (3.14159f * 1.5f) / 11.0f; 638 + int tickStartX = x + (int)((radius - 8) * cos(angle)); 639 + int tickStartY = y + (int)((radius - 8) * sin(angle)); 640 + int tickEndX = x + (int)((radius - 4) * cos(angle)); 641 + int tickEndY = y + (int)((radius - 4) * sin(angle)); 642 MoveToEx(hdc, tickStartX, tickStartY, NULL); 643 LineTo(hdc, tickEndX, tickEndY); 644 } 645 646 DeleteObject(tickPen); 647 648 + // Chrome-style pointer with shadow 649 float normalizedFreq = (frequency - 10.0f) / 24.0f; 650 float angle = -3.14159f * 0.75f + normalizedFreq * (3.14159f * 1.5f); 651 + int pointerX = x + (int)((radius - 15) * cos(angle)); 652 + int pointerY = y + (int)((radius - 15) * sin(angle)); 653 + 654 + // Pointer shadow 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); 660 661 + // Main pointer 662 + HPEN pointerPen = CreatePen(PS_SOLID, 3, RGB(255, 64, 64)); 663 SelectObject(hdc, pointerPen); 664 MoveToEx(hdc, x, y, NULL); 665 LineTo(hdc, pointerX, pointerY); 666 DeleteObject(pointerPen); 667 668 + // Center dot 669 + HBRUSH centerBrush = CreateSolidBrush(RGB(64, 64, 64)); 670 + SelectObject(hdc, centerBrush); 671 + Ellipse(hdc, x - 4, y - 4, x + 4, y + 4); 672 + DeleteObject(centerBrush); 673 + 674 DeleteObject(smallFont); 675 676 + // Label with Winamp style 677 + SetTextColor(hdc, RGB(192, 192, 192)); 678 + HFONT labelFont = CreateFont(12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 679 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 680 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 681 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 682 SelectObject(hdc, labelFont); 683 SetTextAlign(hdc, TA_CENTER); 684 TextOut(hdc, x, y + radius + 15, "TUNING", 6); ··· 686 } 687 688 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; 692 + HBRUSH gradBrush = CreateSolidBrush(RGB(gray, gray, gray)); 693 + SelectObject(hdc, gradBrush); 694 + Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i); 695 + DeleteObject(gradBrush); 696 + } 697 + 698 + // Inner knob surface 699 + HBRUSH knobBrush = CreateSolidBrush(RGB(180, 180, 180)); 700 SelectObject(hdc, knobBrush); 701 + Ellipse(hdc, x - radius + 6, y - radius + 6, x + radius - 6, y + radius - 6); 702 DeleteObject(knobBrush); 703 704 + // Outer ring 705 + HPEN ringPen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64)); 706 + SelectObject(hdc, ringPen); 707 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 708 + DeleteObject(ringPen); 709 710 + // Volume indicator with glow 711 float angle = volume * 3.14159f * 1.5f - 3.14159f * 0.75f; 712 + int indicatorX = x + (int)((radius - 8) * cos(angle)); 713 + int indicatorY = y + (int)((radius - 8) * sin(angle)); 714 + 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); 721 722 + // Main indicator 723 HPEN indicatorPen = CreatePen(PS_SOLID, 2, RGB(255, 255, 255)); 724 SelectObject(hdc, indicatorPen); 725 MoveToEx(hdc, x, y, NULL); 726 LineTo(hdc, indicatorX, indicatorY); 727 DeleteObject(indicatorPen); 728 729 + // Center dot 730 + HBRUSH centerBrush = CreateSolidBrush(RGB(64, 64, 64)); 731 + SelectObject(hdc, centerBrush); 732 + Ellipse(hdc, x - 3, y - 3, x + 3, y + 3); 733 + DeleteObject(centerBrush); 734 + 735 + // Label 736 SetBkMode(hdc, TRANSPARENT); 737 + SetTextColor(hdc, RGB(192, 192, 192)); 738 + HFONT labelFont = CreateFont(12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 739 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 740 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 741 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 742 SelectObject(hdc, labelFont); 743 SetTextAlign(hdc, TA_CENTER); 744 TextOut(hdc, x, y + radius + 15, "VOLUME", 6); ··· 746 } 747 748 void DrawSignalMeter(HDC hdc, int x, int y, int strength) { 749 + // Winamp-style meter background with bevel 750 RECT meter = {x, y, x + 80, y + 20}; 751 + 752 + // Dark background 753 + HBRUSH meterBrush = CreateSolidBrush(RGB(16, 16, 16)); 754 FillRect(hdc, &meter, meterBrush); 755 DeleteObject(meterBrush); 756 757 + // Beveled border 758 + HPEN lightPen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64)); 759 + HPEN darkPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); 760 + 761 + SelectObject(hdc, darkPen); 762 + MoveToEx(hdc, meter.left, meter.bottom, NULL); 763 + LineTo(hdc, meter.left, meter.top); 764 + LineTo(hdc, meter.right, meter.top); 765 766 + SelectObject(hdc, lightPen); 767 + LineTo(hdc, meter.right, meter.bottom); 768 + LineTo(hdc, meter.left, meter.bottom); 769 + 770 + DeleteObject(lightPen); 771 + DeleteObject(darkPen); 772 + 773 + // Neon-style signal bars 774 + int barWidth = 7; 775 int numBars = strength / 10; 776 for (int i = 0; i < numBars && i < 10; i++) { 777 + RECT bar = {x + 3 + i * barWidth, y + 3, 778 + x + 3 + (i + 1) * barWidth - 1, y + 17}; 779 780 COLORREF barColor; 781 + if (i < 3) barColor = RGB(0, 255, 64); // Bright green 782 + else if (i < 7) barColor = RGB(255, 255, 0); // Yellow 783 + else barColor = RGB(255, 64, 64); // Bright red 784 785 HBRUSH barBrush = CreateSolidBrush(barColor); 786 FillRect(hdc, &bar, barBrush); 787 DeleteObject(barBrush); 788 + 789 + // Add glow effect 790 + COLORREF glowColor; 791 + if (i < 3) glowColor = RGB(0, 128, 32); 792 + else if (i < 7) glowColor = RGB(128, 128, 0); 793 + else glowColor = RGB(128, 32, 32); 794 + 795 + HPEN glowPen = CreatePen(PS_SOLID, 1, glowColor); 796 + SelectObject(hdc, glowPen); 797 + Rectangle(hdc, bar.left - 1, bar.top - 1, bar.right + 1, bar.bottom + 1); 798 + DeleteObject(glowPen); 799 } 800 801 + // Label 802 SetBkMode(hdc, TRANSPARENT); 803 + SetTextColor(hdc, RGB(192, 192, 192)); 804 + HFONT labelFont = CreateFont(11, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 805 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 806 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 807 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 808 SelectObject(hdc, labelFont); 809 SetTextAlign(hdc, TA_LEFT); 810 + TextOut(hdc, x, y - 16, "SIGNAL", 6); 811 DeleteObject(labelFont); 812 } 813 814 void DrawVUMeter(HDC hdc, int x, int y, float leftLevel, float rightLevel) { 815 + // Winamp-style VU meter with classic look 816 RECT meterBg = {x, y, x + 80, y + 40}; 817 + 818 + // Dark background 819 + HBRUSH bgBrush = CreateSolidBrush(RGB(16, 16, 16)); 820 FillRect(hdc, &meterBg, bgBrush); 821 DeleteObject(bgBrush); 822 823 + // Beveled border 824 + HPEN lightPen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64)); 825 + HPEN darkPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0)); 826 827 + SelectObject(hdc, darkPen); 828 + MoveToEx(hdc, meterBg.left, meterBg.bottom, NULL); 829 + LineTo(hdc, meterBg.left, meterBg.top); 830 + LineTo(hdc, meterBg.right, meterBg.top); 831 + 832 + SelectObject(hdc, lightPen); 833 + LineTo(hdc, meterBg.right, meterBg.bottom); 834 + LineTo(hdc, meterBg.left, meterBg.bottom); 835 + 836 + DeleteObject(lightPen); 837 + DeleteObject(darkPen); 838 + 839 + // "VU" label with classic styling 840 + SetTextColor(hdc, RGB(0, 255, 0)); 841 SetBkMode(hdc, TRANSPARENT); 842 + HFONT vuFont = CreateFont(10, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 843 + DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 844 + CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 845 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 846 + SelectObject(hdc, vuFont); 847 + TextOut(hdc, x + 5, y + 2, "VU", 2); 848 849 + // Left channel meter with neon effect 850 + int leftWidth = (int)(leftLevel * 65); 851 if (leftWidth > 0) { 852 + RECT leftBar = {x + 8, y + 12, x + 8 + leftWidth, y + 17}; 853 + 854 + // Determine color based on level 855 + COLORREF leftColor; 856 + if (leftLevel > 0.8f) leftColor = RGB(255, 64, 64); // Red 857 + else if (leftLevel > 0.6f) leftColor = RGB(255, 255, 0); // Yellow 858 + else leftColor = RGB(0, 255, 64); // Green 859 + 860 HBRUSH leftBrush = CreateSolidBrush(leftColor); 861 FillRect(hdc, &leftBar, leftBrush); 862 DeleteObject(leftBrush); 863 + 864 + // Add glow effect 865 + COLORREF glowColor; 866 + if (leftLevel > 0.8f) glowColor = RGB(128, 32, 32); 867 + else if (leftLevel > 0.6f) glowColor = RGB(128, 128, 0); 868 + else glowColor = RGB(0, 128, 32); 869 + 870 + HPEN glowPen = CreatePen(PS_SOLID, 1, glowColor); 871 + SelectObject(hdc, glowPen); 872 + Rectangle(hdc, leftBar.left - 1, leftBar.top - 1, leftBar.right + 1, leftBar.bottom + 1); 873 + DeleteObject(glowPen); 874 } 875 876 + // Right channel meter with neon effect 877 + int rightWidth = (int)(rightLevel * 65); 878 if (rightWidth > 0) { 879 + RECT rightBar = {x + 8, y + 22, x + 8 + rightWidth, y + 27}; 880 + 881 + // Determine color based on level 882 + COLORREF rightColor; 883 + if (rightLevel > 0.8f) rightColor = RGB(255, 64, 64); // Red 884 + else if (rightLevel > 0.6f) rightColor = RGB(255, 255, 0); // Yellow 885 + else rightColor = RGB(0, 255, 64); // Green 886 + 887 HBRUSH rightBrush = CreateSolidBrush(rightColor); 888 FillRect(hdc, &rightBar, rightBrush); 889 DeleteObject(rightBrush); 890 + 891 + // Add glow effect 892 + COLORREF glowColor; 893 + if (rightLevel > 0.8f) glowColor = RGB(128, 32, 32); 894 + else if (rightLevel > 0.6f) glowColor = RGB(128, 128, 0); 895 + else glowColor = RGB(0, 128, 32); 896 + 897 + HPEN glowPen = CreatePen(PS_SOLID, 1, glowColor); 898 + SelectObject(hdc, glowPen); 899 + Rectangle(hdc, rightBar.left - 1, rightBar.top - 1, rightBar.right + 1, rightBar.bottom + 1); 900 + DeleteObject(glowPen); 901 } 902 903 + // Channel labels 904 + SetTextColor(hdc, RGB(192, 192, 192)); 905 + TextOut(hdc, x + 75, y + 12, "L", 1); 906 + TextOut(hdc, x + 75, y + 22, "R", 1); 907 908 + // Scale marks 909 + HPEN scalePen = CreatePen(PS_SOLID, 1, RGB(64, 64, 64)); 910 SelectObject(hdc, scalePen); 911 for (int i = 1; i < 10; i++) { 912 + int markX = x + 8 + (i * 7); 913 MoveToEx(hdc, markX, y + 30, NULL); 914 LineTo(hdc, markX, y + 32); 915 } 916 DeleteObject(scalePen); 917 + DeleteObject(vuFont); 918 } 919 920 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); 925 + HBRUSH buttonBrush = CreateSolidBrush(buttonColor); 926 + SelectObject(hdc, buttonBrush); 927 + Ellipse(hdc, x - radius + i, y - radius + i, x + radius - i, y + radius - i); 928 + DeleteObject(buttonBrush); 929 + } 930 931 + // Inner button surface 932 + COLORREF innerColor = power ? RGB(255, 128, 128) : RGB(128, 128, 128); 933 + HBRUSH innerBrush = CreateSolidBrush(innerColor); 934 + SelectObject(hdc, innerBrush); 935 + Ellipse(hdc, x - radius + 6, y - radius + 6, x + radius - 6, y + radius - 6); 936 + DeleteObject(innerBrush); 937 + 938 + // Button border 939 + HPEN borderPen = CreatePen(PS_SOLID, 2, RGB(32, 32, 32)); 940 SelectObject(hdc, borderPen); 941 Ellipse(hdc, x - radius, y - radius, x + radius, y + radius); 942 DeleteObject(borderPen); 943 944 + // Power symbol with glow effect 945 if (power) { 946 + // 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); 953 + 954 + // Main symbol 955 HPEN symbolPen = CreatePen(PS_SOLID, 3, RGB(255, 255, 255)); 956 SelectObject(hdc, symbolPen); 957 Arc(hdc, x - 8, y - 8, x + 8, y + 8, x + 6, y - 6, x - 6, y - 6); 958 MoveToEx(hdc, x, y - 10, NULL); 959 LineTo(hdc, x, y - 2); 960 + DeleteObject(symbolPen); 961 + } else { 962 + // Dim power symbol 963 + HPEN symbolPen = CreatePen(PS_SOLID, 2, RGB(64, 64, 64)); 964 + SelectObject(hdc, symbolPen); 965 + Arc(hdc, x - 8, y - 8, x + 8, y + 8, x + 6, y - 6, x - 6, y - 6); 966 + MoveToEx(hdc, x, y - 10, NULL); 967 + LineTo(hdc, x, y - 2); 968 DeleteObject(symbolPen); 969 } 970 971 + // Label 972 SetBkMode(hdc, TRANSPARENT); 973 + SetTextColor(hdc, power ? RGB(255, 192, 192) : RGB(192, 192, 192)); 974 + HFONT labelFont = CreateFont(12, 0, 0, 0, FW_BOLD, FALSE, FALSE, FALSE, 975 DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, 976 CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, 977 + DEFAULT_PITCH | FF_SWISS, "Tahoma"); 978 SelectObject(hdc, labelFont); 979 SetTextAlign(hdc, TA_CENTER); 980 TextOut(hdc, x, y - radius - 18, "POWER", 5);