Ignore:
Timestamp:
Mar 21, 2000, 6:30:46 PM (25 years ago)
Author:
cbratschi
Message:

bug fixes and improvements

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/comctl32/flatsb.cpp

    r2895 r3182  
    1 /* $Id: flatsb.cpp,v 1.2 2000-02-25 17:00:15 cbratschi Exp $ */
     1/* $Id: flatsb.cpp,v 1.3 2000-03-21 17:30:41 cbratschi Exp $ */
    22/*
    33 * Flat Scrollbar control
     
    2222#include "ccbase.h"
    2323#include "flatsb.h"
    24 
     24#include <misc.h>
    2525
    2626#define FlatSB_GetInfoPtr(hwnd) ((FLATSB_INFO*)getInfoPtr(hwnd))
    2727
    2828
    29 BOOL WINAPI
    30 FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
     29BOOL WINAPI FlatSB_EnableScrollBar(HWND hwnd, INT dummy, UINT dummy2)
    3130{
    32 //    FIXME_(commctrl)("stub\n");
    33     return 0;
     31  dprintf(("COMCTL32: FlatSB_EnableScrollBar - empty stub!!!"));
     32
     33  return 0;
    3434}
    3535
    36 BOOL WINAPI
    37 FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
     36BOOL WINAPI FlatSB_ShowScrollBar(HWND hwnd, INT code, BOOL flag)
    3837{
    39 //    FIXME_(commctrl)("stub\n");
    40     return 0;
     38  dprintf(("COMCTL32: FlatSB_ShowScrollBar - empty stub!!!"));
     39
     40  return 0;
    4141}
    4242
    43 BOOL WINAPI
    44 FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
     43BOOL WINAPI FlatSB_GetScrollRange(HWND hwnd, INT code, LPINT min, LPINT max)
    4544{
    46 //    FIXME_(commctrl)("stub\n");
    47     return 0;
     45  dprintf(("COMCTL32: FlatSB_GetScrollRange - empty stub!!!"));
     46
     47  return 0;
    4848}
    4949
    50 BOOL WINAPI
    51 FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
     50BOOL WINAPI FlatSB_GetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info)
    5251{
    53 //    FIXME_(commctrl)("stub\n");
    54     return 0;
     52  dprintf(("COMCTL32: FlatSB_GetScrollInfo - empty stub!!!"));
     53
     54  return 0;
    5555}
    5656
    57 INT WINAPI
    58 FlatSB_GetScrollPos(HWND hwnd, INT code)
     57INT WINAPI FlatSB_GetScrollPos(HWND hwnd, INT code)
    5958{
    60 //    FIXME_(commctrl)("stub\n");
    61     return 0;
     59  dprintf(("COMCTL32: FlatSB_GetScrollPos - empty stub!!!"));
     60
     61  return 0;
    6262}
    6363
    64 BOOL WINAPI
    65 FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
     64BOOL WINAPI FlatSB_GetScrollProp(HWND hwnd, INT propIndex, LPINT prop)
    6665{
    67 //    FIXME_(commctrl)("stub\n");
    68     return 0;
     66  dprintf(("COMCTL32: FlatSB_GetScrollProp - empty stub!!!"));
     67
     68  return 0;
    6969}
    7070
    7171
    72 INT WINAPI
    73 FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
     72INT WINAPI FlatSB_SetScrollPos(HWND hwnd, INT code, INT pos, BOOL fRedraw)
    7473{
    75 //    FIXME_(commctrl)("stub\n");
    76     return 0;
     74  dprintf(("COMCTL32: FlatSB_SetScrollPos - empty stub!!!"));
     75
     76  return 0;
    7777}
    7878
    79 INT WINAPI
    80 FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
     79INT WINAPI FlatSB_SetScrollInfo(HWND hwnd, INT code, LPSCROLLINFO info, BOOL fRedraw)
    8180{
    82 //    FIXME_(commctrl)("stub\n");
    83     return 0;
     81  dprintf(("COMCTL32: FlatSB_EnableScrollBar - empty stub!!!"));
     82
     83  return 0;
    8484}
    8585
    86 INT WINAPI
    87 FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
     86INT WINAPI FlatSB_SetScrollRange(HWND hwnd, INT code, INT min, INT max, BOOL fRedraw)
    8887{
    89 //    FIXME_(commctrl)("stub\n");
    90     return 0;
     88  dprintf(("COMCTL32: FlatSB_SetScrollRange - empty stub!!!"));
     89
     90  return 0;
    9191}
    9292
    93 BOOL WINAPI
    94 FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
     93BOOL WINAPI FlatSB_SetScrollProp(HWND hwnd, UINT index, INT newValue, BOOL flag)
    9594{
    96 //    FIXME_(commctrl)("stub\n");
    97     return 0;
     95  dprintf(("COMCTL32: FlatSB_SetScrollProp - empty stub!!!"));
     96
     97  return 0;
    9898}
    9999
     
    101101BOOL WINAPI InitializeFlatSB(HWND hwnd)
    102102{
    103 //    FIXME_(commctrl)("stub\n");
    104     return 0;
     103  dprintf(("COMCTL32: FlatSB_InitializeFlatSB - empty stub!!!"));
     104
     105  return 0;
    105106}
    106107
    107108HRESULT WINAPI UninitializeFlatSB(HWND hwnd)
    108109{
    109 //    FIXME_(commctrl)("stub\n");
    110     return 0;
     110  dprintf(("COMCTL32: FlatSB_UninitializeFlatSB - empty stub!!!"));
     111
     112  return 0;
    111113}
    112114
    113115
    114116
    115 static LRESULT
    116 FlatSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
     117static LRESULT FLATSB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
    117118{
    118     return 0;
     119  return 0;
    119120}
    120121
    121 
    122 static LRESULT
    123 FlatSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
     122static LRESULT FLATSB_Destroy (HWND hwnd, WPARAM wParam, LPARAM lParam)
    124123{
    125     return 0;
     124  return 0;
    126125}
    127126
     127static VOID FLATSB_Draw(HWND hwnd,HDC hdc,RECT *updateRect)
     128{
     129  drawStubControl(hwnd,hdc);
     130}
    128131
     132static LRESULT FLATSB_Paint(HWND hwnd,WPARAM wParam,LPARAM lParam)
     133{
     134  HDC hdc = (HDC)wParam;
    129135
     136  if (!hdc)
     137  {
     138    PAINTSTRUCT ps;
    130139
    131 static LRESULT WINAPI
    132 FlatSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
     140    hdc = BeginPaint(hwnd,&ps);
     141    FLATSB_Draw(hwnd, hdc,&ps.rcPaint);
     142    EndPaint(hwnd,&ps);
     143  } else
     144      FLATSB_Draw(hwnd,hdc,NULL);
     145
     146  return 0;
     147}
     148
     149static LRESULT WINAPI FLATSB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    133150{
    134     switch (uMsg)
    135     {
     151  switch (uMsg)
     152  {
     153    case WM_CREATE:
     154      return FLATSB_Create (hwnd, wParam, lParam);
    136155
    137         case WM_CREATE:
    138             return FlatSB_Create (hwnd, wParam, lParam);
     156    case WM_DESTROY:
     157      return FLATSB_Destroy (hwnd, wParam, lParam);
    139158
    140         case WM_DESTROY:
    141             return FlatSB_Destroy (hwnd, wParam, lParam);
     159    case WM_PAINT:
     160      return FLATSB_Paint(hwnd,wParam,lParam);
    142161
    143         default:
    144 //          if (uMsg >= WM_USER)
    145 //              ERR_(datetime)("unknown msg %04x wp=%08x lp=%08lx\n",
    146 //                   uMsg, wParam, lParam);
    147             return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
    148     }
    149     return 0;
     162    default:
     163      //if (uMsg >= WM_USER)
     164      //    ERR_(datetime)("unknown msg %04x wp=%08x lp=%08lx\n",
     165      //         uMsg, wParam, lParam);
     166      return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
     167  }
     168  return 0;
    150169}
    151170
     
    158177    ZeroMemory (&wndClass, sizeof(WNDCLASSA));
    159178    wndClass.style         = CS_GLOBALCLASS;
    160     wndClass.lpfnWndProc   = (WNDPROC)FlatSB_WindowProc;
     179    wndClass.lpfnWndProc   = (WNDPROC)FLATSB_WindowProc;
    161180    wndClass.cbClsExtra    = 0;
    162181    wndClass.cbWndExtra    = sizeof(FLATSB_INFO *);
Note: See TracChangeset for help on using the changeset viewer.