source: trunk/src/user32/SYSCLR.CPP@ 46

Last change on this file since 46 was 46, checked in by sandervl, 26 years ago

* empty log message *

File size: 2.5 KB
Line 
1/*
2 * Win32 system color API functions for OS/2
3 *
4 * Copyright 1998 Sander van Leeuwen
5 *
6 *
7 * Project Odin Software License can be found in LICENSE.TXT
8 *
9 */
10#define INCL_WINSYS
11#include <os2.h>
12#include "os2native.h"
13#include "misc.h"
14#include "sysclr.h"
15
16//******************************************************************************
17//******************************************************************************
18DWORD WIN32API GetSysColor(int winIndex)
19{
20 DWORD rgb;
21 int os2Index;
22
23 switch(winIndex) {
24 case COLOR_SCROLLBAR:
25 os2Index = SYSCLR_SCROLLBAR;
26 break;
27 case COLOR_BACKGROUND:
28 os2Index = SYSCLR_BACKGROUND;
29 break;
30 case COLOR_ACTIVECAPTION:
31 os2Index = SYSCLR_ACTIVETITLETEXT;
32 break;
33 case COLOR_INACTIVECAPTION:
34 os2Index = SYSCLR_INACTIVETITLETEXT;
35 break;
36 case COLOR_MENU:
37 os2Index = SYSCLR_MENU;
38 break;
39 case COLOR_WINDOW:
40 os2Index = SYSCLR_WINDOW;
41 break;
42 case COLOR_WINDOWFRAME:
43 os2Index = SYSCLR_WINDOWFRAME;
44 break;
45 case COLOR_MENUTEXT:
46 os2Index = SYSCLR_MENUTEXT;
47 break;
48 case COLOR_WINDOWTEXT:
49 os2Index = SYSCLR_WINDOWTEXT;
50 break;
51 case COLOR_CAPTIONTEXT:
52 os2Index = SYSCLR_TITLETEXT;
53 break;
54 case COLOR_ACTIVEBORDER:
55 os2Index = SYSCLR_ACTIVEBORDER;
56 break;
57 case COLOR_INACTIVEBORDER:
58 os2Index = SYSCLR_INACTIVEBORDER;
59 break;
60 case COLOR_APPWORKSPACE:
61 os2Index = SYSCLR_APPWORKSPACE;
62 break;
63 case COLOR_HIGHLIGHT:
64 os2Index = SYSCLR_HILITEBACKGROUND;
65 break;
66 case COLOR_HIGHLIGHTTEXT:
67 os2Index = COLOR_WINDOWTEXT;
68 break;
69 case COLOR_BTNFACE:
70 os2Index = SYSCLR_HILITEBACKGROUND;
71 break;
72 case COLOR_BTNSHADOW:
73 os2Index = SYSCLR_SHADOW;
74 break;
75 case COLOR_GRAYTEXT:
76 os2Index = SYSCLR_MENUDISABLEDTEXT;
77 break;
78 case COLOR_BTNTEXT:
79 os2Index = SYSCLR_BUTTONDEFAULT;
80 break;
81 case COLOR_INACTIVECAPTIONTEXT:
82 os2Index = SYSCLR_INACTIVETITLETEXT;
83 break;
84 case COLOR_BTNHIGHLIGHT:
85 os2Index = SYSCLR_HILITEBACKGROUND;
86 break;
87 case COLOR_3DDKSHADOW:
88 os2Index = SYSCLR_SHADOW;
89 break;
90 case COLOR_3DLIGHT:
91 os2Index = SYSCLR_HILITEBACKGROUND;
92 break;
93 case COLOR_INFOTEXT:
94 os2Index = SYSCLR_HELPTEXT;
95 break;
96 case COLOR_INFOBK:
97 os2Index = SYSCLR_HELPBACKGROUND;
98 break;
99 default:
100#ifdef DEBUG
101 WriteLog("GetSysColor UNKNOWN index %d!!\n", winIndex);
102#endif
103 return(0);
104 }
105 rgb = WinQuerySysColor(HWND_DESKTOP, os2Index, 0);
106#ifdef DEBUG
107 WriteLog("GetSysColor %d returned %X\n", os2Index, rgb);
108#endif
109 return(rgb);
110}
111//******************************************************************************
112//******************************************************************************
Note: See TracBrowser for help on using the repository browser.