Changeset 38

Show
Ignore:
Timestamp:
01/20/08 12:02:25 (11 months ago)
Author:
cinc
Message:

Fix for ticket #12. Toolbar buttons used a predefined bg color. Now they are painted with the launcharea color. Moved some defines to a new include file.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/Menufolder/c/cwlauncharea.cpp

    r32 r38  
    11/* 
    2  * This file is (C) Chris Wohlgemuth 1996/2007 
    3  */ 
    4 /* 
    5  * This program is free software; you can redistribute it and/or modify 
    6  * it under the terms of the GNU General Public License as published by 
    7  * the Free Software Foundation; either version 2, or (at your option) 
    8  * any later version. 
    9  * 
    10  * This program is distributed in the hope that it will be useful, 
    11  * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    13  * GNU General Public License for more details. 
    14  * 
    15  * You should have received a copy of the GNU General Public License 
    16  * along with this program; see the file COPYING.  If not, write to 
    17  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
    18  */ 
     2  This file is (C) Chris Wohlgemuth 1996/2008 
     3 
     4  This file is copyrighted. 
     5 
     6  For licensing contact cinc-ml@netlabs.org 
     7 
     8  No use or copying without prior permission. 
     9 
     10*/ 
    1911 
    2012#define INCL_DOS 
     
    4032#include "sys_funcs.h" 
    4133 
    42 #define CW_LAUNCHAREA       "CW_LAUNCHAREA" 
    43 #define LAUNCHAREA_DATASIZE 4 
     34/* launcharea specific defines */ 
     35#include "cwlauncharea_inc.h" 
     36 
     37 
    4438/* Vars for launcharea class */ 
    4539ULONG   g_ulStaticDataOffset=0; 
     
    4943static BOOL fInitCWLADone=FALSE; 
    5044 
    51 #define LP_USEOBJECTASPARAM  0x00000001 
     45//#define LP_USEOBJECTASPARAM  0x00000001 
     46 
     47/* This one should go in an include file */ 
    5248#define WPSWIZARD_TBID "<WPSWIZARD_TOOLBAR>" 
    53  
    54 #define VIEW_LAUNCHAREA  WPMENUID_USER+0x1000 
    55 //#define VIEW_LAUNCHAREA  0x1000 
    5649 
    5750#define  WM_NEWBUBBLE   WM_USER+100 //Use ATOM later 
     
    7164static ULONG ulIconSize=40; 
    7265static HAB g_hab; 
     66 
     67/* launcharea SOM stuff */ 
    7368#include "cwlauncharea.hh" 
    7469 
     
    159154      } 
    160155#endif 
    161       WinFillRect(hps, &rcl, CLR_PALEGRAY /*0x00ff0000*/); 
     156      WinFillRect(hps, &rcl, CLR_LAUNCHAREA /*CLR_PALEGRAY*/); 
    162157      if(fHilite) 
    163158        WinDrawBorder(hps, &rcl, 2, 2, 0, 0, 0x800); 
     
    660655} 
    661656 
    662  
     657/* 
     658  Window procedure handling the launcharea window class (CW_LAUNCHAREA). Because the 
     659  buttons on the launcharea are user buttons all paint messages for the buttons will 
     660  end up here, too. 
     661 */ 
    663662static MRESULT EXPENTRY fnwpLaunchAreaProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)  
    664663{ 
     
    786785        HPS hps=WinBeginPaint(hwnd,NULLHANDLE, &rcl); 
    787786 
    788         WinFillRect(hps, &rcl, SYSCLR_DIALOGBACKGROUND); 
     787        WinFillRect(hps, &rcl, CLR_LAUNCHAREA); 
    789788        lp=(CWLaunchArea*)WinQueryWindowULong(hwnd,QWL_USER); 
    790789        if(somIsObj(lp)) {