summaryrefslogtreecommitdiffstats
path: root/private/oleutest/letest/gizmobar/gizmoint.h
blob: 842b62a3e7da0abc98d707dc168e9d20c7021781 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
/*
 * GIZMOINT.H
 * GizmoBar Version 1.00, Win32 version August 1993
 *
 * Internal definitions for the GizmoBar DLL
 *
 * Copyright (c)1993 Microsoft Corporation, All Rights Reserved
 *
 * Kraig Brockschmidt, Software Design Engineer
 * Microsoft Systems Developer Relations
 *
 * Internet  :  kraigb@microsoft.com
 * Compuserve:  >INTERNET:kraigb@microsoft.com
 */


#ifndef _GIZMOINT_H_
#define _GIZMOINT_H_

#include <bttncur.h>
#include <book1632.h>
#include "gizmo.h"
#include "gizmobar.h"

#ifdef __cplusplus
extern "C"
    {
#endif


/*
 * The main gizmobar structure itself.  There's only one of these,
 * but it references the first GIZMO in the list.
 */

typedef struct tagGIZMOBAR
    {
    LPGIZMO     pGizmos;            //List of gizmos we own.
    HWND        hWnd;               //Window handle of ourselves.
    HINSTANCE   hInst;
    HWND        hWndAssociate;      //Associate window handle who gets messages.
    DWORD       dwStyle;            //Copy of GetWindowLong(hWnd, GWL_STYLE)
    UINT        uState;             //State flags
    UINT        uID;                //Control ID.

    HBRUSH      hBrFace;            //Static control background color
    COLORREF    crFace;             //Color of hBrFace
    HFONT       hFont;              //Font in use, defaults to system, WM_SETFONT
    BOOL        fEnabled;           //Are we enabled?

    LPGIZMO     pGizmoTrack;        //Current pressed button.
    BOOL        fTracking;
    BOOL        fMouseOut;
    } GIZMOBAR, FAR * LPGIZMOBAR;

#define CBGIZMOBAR sizeof(GIZMOBAR)


//Extra bytes for the window if the size of a local handle.
#define CBWINDOWEXTRA       sizeof(LPGIZMOBAR)

#define GBWL_STRUCTURE      0


//Structure for passing paint information to a gizmo enumeration callback.
typedef struct
    {
    HDC     hDC;
    BOOL    fPaint;
    } PAINTGIZMO, FAR * LPPAINTGIZMO;



//Private functions specific to the control.

//INIT.C
#ifdef WIN32
    extern BOOL WINAPI _CRT_INIT(HINSTANCE, DWORD, LPVOID);
    extern _cexit(void);
#endif //WIN32

void FAR PASCAL   WEP(int);
BOOL              FRegisterControl(HINSTANCE);
LPGIZMOBAR        GizmoBarPAllocate(LPINT, HWND, HINSTANCE, HWND, DWORD, UINT, UINT);
LPGIZMOBAR        GizmoBarPFree(LPGIZMOBAR);


//PAINT.C
void              GizmoBarPaint(HWND, LPGIZMOBAR);
BOOL FAR PASCAL   FEnumPaintGizmos(LPGIZMO, UINT, DWORD);


//GIZMOBAR.C
LRESULT FAR PASCAL GizmoBarWndProc(HWND, UINT, WPARAM, LPARAM);
BOOL    FAR PASCAL FEnumChangeFont(LPGIZMO, UINT, DWORD);
BOOL    FAR PASCAL FEnumEnable(LPGIZMO, UINT, DWORD);
BOOL    FAR PASCAL FEnumHitTest(LPGIZMO, UINT, DWORD);


//API.C  Also see GIZMOBAR.H for others
LRESULT    GBMessageHandler(HWND, UINT, WPARAM, LPARAM, LPGIZMOBAR);
LPGIZMO    PGizmoFromHwndID(HWND, UINT);


#endif //_GIZMOINT_H_