Changeset 926 for trunk/dll/mainwnd.c


Ignore:
Timestamp:
Jan 17, 2008, 2:53:52 AM (18 years ago)
Author:
Gregg Young
Message:

Background color on toolbar now can be change with drag drop; ticket 161. Set command line string length to 2048

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/mainwnd.c

    r925 r926  
    24672467  case WM_CREATE:
    24682468    hwndToolback = hwnd;
    2469     SetPresParams(hwnd,
    2470                   &RGBGREY, &RGBBLACK, &RGBGREY, GetPString(IDS_8HELVTEXT));
     2469    RestorePresParams(hwnd, "ToolBar");
    24712470    break;
    24722471
     
    24902489
    24912490  case WM_PAINT:
     2491
     2492    PaintRecessedWindow(hwnd, (HPS)0, TRUE, FALSE);
     2493
    24922494    {
    24932495      HPS hps;
    24942496      RECTL rcl;
    2495 
    2496       hps = WinBeginPaint(hwnd, (HPS) 0, NULL);
     2497      ULONG lColor;
     2498
     2499      hps = WinBeginPaint(hwnd, (HPS)0, NULL);
    24972500      if (hps) {
    2498         WinQueryWindowRect(hwnd, &rcl);
    2499         WinFillRect(hps, &rcl, CLR_PALEGRAY);
    2500         WinEndPaint(hps);
    2501       }
    2502       PaintRecessedWindow(hwnd, (HPS) 0, TRUE, FALSE);
    2503     }
     2501        GpiCreateLogColorTable(hps, 0, LCOLF_RGB, 0, 0, NULL);
     2502        WinQueryPresParam(hwnd,              /* Window handle         */
     2503                          PP_BACKGROUNDCOLOR,  /* Background presparam  */
     2504                          0,
     2505                          NULL,
     2506                          sizeof(lColor),      /* Length of data buffer */
     2507                          &lColor,             /* Data buffer returned  */
     2508                          0);
     2509        WinQueryWindowRect(hwnd, &rcl);
     2510        WinFillRect(hps, &rcl, lColor);
     2511        WinEndPaint(hps);
     2512      }
     2513
     2514    }
     2515    break;
     2516
     2517  case WM_PRESPARAMCHANGED:
     2518    PresParamChanged(hwnd, "ToolBar", mp1, mp2);
     2519    WinInvalidateRect(hwnd, NULL, TRUE);
    25042520    break;
    25052521
Note: See TracChangeset for help on using the changeset viewer.