source: trunk/src/comctl32/flatsb.c@ 42

Last change on this file since 42 was 42, checked in by achimha, 26 years ago

New Comctl32 controls - not all are compiling/linking yet!

File size: 3.2 KB
Line 
1/*
2 * Flat Scrollbar control
3 *
4 * Copyright 1998, 1999 Eric Kohl
5 * Copyright 1998 Alex Priem
6 *
7 * NOTES
8 * This is just a dummy control. An author is needed! Any volunteers?
9 * I will only improve this control once in a while.
10 * Eric <ekohl@abo.rhein-zeitung.de>
11 *
12 * TODO:
13 * - All messages.
14 * - All notifications.
15 *
16 */
17
18#include "winbase.h"
19#include "commctrl.h"
20#include "flatsb.h"
21
22
23#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)GetWindowLongA (hwnd, 0))
24
25
26BOOL WINAPI
27FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
28{
29// FIXME_(commctrl)("stub\n");
30 return 0;
31}
32
33BOOL WINAPI
34FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
35{
36// FIXME_(commctrl)("stub\n");
37 return 0;
38}
39
40BOOL WINAPI
41FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
42{
43// FIXME_(commctrl)("stub\n");
44 return 0;
45}
46
47BOOL WINAPI
48FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
49{
50// FIXME_(commctrl)("stub\n");
51 return 0;
52}
53
54INT WINAPI
55FlatSB_GetScrollPos(HWND hwnd, INT code)
56{
57// FIXME_(commctrl)("stub\n");
58 return 0;
59}
60
61BOOL WINAPI
62FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
63{
64// FIXME_(commctrl)("stub\n");
65 return 0;
66}
67
68
69INT WINAPI
70FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
71{
72// FIXME_(commctrl)("stub\n");
73 return 0;
74}
75
76INT WINAPI
77FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
78{
79// FIXME_(commctrl)("stub\n");
80 return 0;
81}
82
83INT WINAPI
84FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
85{
86// FIXME_(commctrl)("stub\n");
87 return 0;
88}
89
90BOOL WINAPI
91FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
92{
93// FIXME_(commctrl)("stub\n");
94 return 0;
95}
96
97
98BOOL WINAPI InitializeFlatSB(HWND hwnd)
99{
100// FIXME_(commctrl)("stub\n");
101 return 0;
102}
103
104HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
105{
106// FIXME_(commctrl)("stub\n");
107 return 0;
108}
109
110
111
112static LRESULT
113FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
114{
115 return 0;
116}
117
118
119static LRESULT
120FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
121{
122 return 0;
123}
124
125
126
127
128LRESULT WINAPI
129FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
130{
131 switch (uMsg)
132 {
133
134 case WM_CREATE:
135 return FlatSB_Create (hwnd, wParam, lParam);
136
137 case WM_DESTROY:
138 return FlatSB_Destroy (hwnd, wParam, lParam);
139
140 default:
141// if (uMsg >= WM_USER)
142// ERR_(datetime)("unknown msg %04x wp=%08x lp=%08lx\n",
143// uMsg, wParam, lParam);
144 return DefWindowProcA (hwnd, uMsg, wParam, lParam);
145 }
146 return 0;
147}
148
149
150VOID
151FLATSB_Register (VOID)
152{
153 WNDCLASSA wndClass;
154
155 if (GlobalFindAtomA (FLATSB_CLASSA)) return;
156
157 ZeroMemory (&wndClass, sizeof(WNDCLASSA));
158 wndClass.style = CS_GLOBALCLASS;
159 wndClass.lpfnWndProc = (WNDPROC)FlatSB_WindowProc;
160 wndClass.cbClsExtra = 0;
161 wndClass.cbWndExtra = sizeof(FLATSB_INFO *);
162 wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
163 wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
164 wndClass.lpszClassName = FLATSB_CLASSA;
165
166 RegisterClassA (&wndClass);
167}
168
169
170VOID
171FLATSB_Unregister (VOID)
172{
173 if (GlobalFindAtomA (FLATSB_CLASSA))
174 UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL);
175}
176
Note: See TracBrowser for help on using the repository browser.