1999-01-17 17:32:32 +01:00
|
|
|
/*
|
|
|
|
* Flat Scrollbar control
|
|
|
|
*
|
|
|
|
* Copyright 1998 Eric Kohl
|
1999-01-24 20:14:58 +01:00
|
|
|
* Copyright 1998 Alex Priem
|
1999-01-17 17:32:32 +01:00
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* This is just a dummy control. An author is needed! Any volunteers?
|
|
|
|
* I will only improve this control once in a while.
|
|
|
|
* Eric <ekohl@abo.rhein-zeitung.de>
|
|
|
|
*
|
|
|
|
* TODO:
|
|
|
|
* - All messages.
|
|
|
|
* - All notifications.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "commctrl.h"
|
|
|
|
#include "flatsb.h"
|
|
|
|
#include "win.h"
|
|
|
|
#include "debug.h"
|
|
|
|
|
|
|
|
|
|
|
|
#define FlatSB_GetInfoPtr(wndPtr) ((FLATSB_INFO*)wndPtr->wExtra[0])
|
|
|
|
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI
|
|
|
|
FlatSB_GetScrollPos(HWND hwnd, INT code)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI
|
|
|
|
FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI
|
|
|
|
FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
INT WINAPI
|
|
|
|
FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI
|
|
|
|
FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI InitializeFlatSB(HWND hwnd)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
FIXME(commctrl,"stub\n");
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static LRESULT
|
1999-02-26 12:11:13 +01:00
|
|
|
FlatSB_Create (WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static LRESULT
|
1999-02-26 12:11:13 +01:00
|
|
|
FlatSB_Destroy (WND *wndPtr, WPARAM wParam, LPARAM lParam)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
LRESULT WINAPI
|
1999-02-26 12:11:13 +01:00
|
|
|
FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
1999-01-17 17:32:32 +01:00
|
|
|
{
|
|
|
|
WND *wndPtr = WIN_FindWndPtr(hwnd);
|
|
|
|
|
|
|
|
switch (uMsg)
|
|
|
|
{
|
|
|
|
|
|
|
|
case WM_CREATE:
|
|
|
|
return FlatSB_Create (wndPtr, wParam, lParam);
|
|
|
|
|
|
|
|
case WM_DESTROY:
|
|
|
|
return FlatSB_Destroy (wndPtr, wParam, lParam);
|
|
|
|
|
|
|
|
default:
|
|
|
|
if (uMsg >= WM_USER)
|
|
|
|
ERR (datetime, "unknown msg %04x wp=%08x lp=%08lx\n",
|
|
|
|
uMsg, wParam, lParam);
|
1999-02-26 12:11:13 +01:00
|
|
|
return DefWindowProcA (hwnd, uMsg, wParam, lParam);
|
1999-01-17 17:32:32 +01:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FLATSB_Register (VOID)
|
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
WNDCLASSA wndClass;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
if (GlobalFindAtomA (FLATSB_CLASSA)) return;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
ZeroMemory (&wndClass, sizeof(WNDCLASSA));
|
1999-01-17 17:32:32 +01:00
|
|
|
wndClass.style = CS_GLOBALCLASS;
|
1999-02-26 12:11:13 +01:00
|
|
|
wndClass.lpfnWndProc = (WNDPROC)FlatSB_WindowProc;
|
1999-01-17 17:32:32 +01:00
|
|
|
wndClass.cbClsExtra = 0;
|
|
|
|
wndClass.cbWndExtra = sizeof(FLATSB_INFO *);
|
1999-02-26 12:11:13 +01:00
|
|
|
wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
|
|
|
|
wndClass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
|
|
|
wndClass.lpszClassName = FLATSB_CLASSA;
|
1999-01-17 17:32:32 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
RegisterClassA (&wndClass);
|
1999-01-17 17:32:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VOID
|
|
|
|
FLATSB_Unregister (VOID)
|
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
if (GlobalFindAtomA (FLATSB_CLASSA))
|
|
|
|
UnregisterClassA (FLATSB_CLASSA, (HINSTANCE)NULL);
|
1999-01-17 17:32:32 +01:00
|
|
|
}
|
|
|
|
|